Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement generation status #12

Merged
merged 1 commit into from
Mar 16, 2018
Merged

Conversation

jerrymarino
Copy link
Collaborator

This patch utilizes a file to track XCHammer updates.

When the generator successfully runs, we create the file.

This patch utilizes a file to track XCHammer updates.

When the generator successfully runs, we create the file.
tempProjectPath)
guard FileManager.default.createFile(atPath: genStatusPath,
contents: "".data(using: .utf8), attributes: nil) else {
fatalError("Can't write genStatus")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean for people that run xchammer? We should have something helpful here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the of the fatals here are meaningful to users, as they're invalid program states ( fatal errors ). Perhaps we should cull them into a fatal XCHammer that is more clear.

xcworkspacePath)
guard FileManager.default.createFile(atPath: genStatusPath,
contents: "".data(using: .utf8), attributes: nil) else {
fatalError("Can't write genStatus")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

if [[ $ACTION == "clean" ]]; then
exit 0
fi

PREV_STAT=`stat -f %c "$0"`
PREV_STAT=`stat -f %c "/Users/jerry/Projects/xchammer-github/sample/UrlGet/UrlGet.xcodeproj/XCHammerAssets/genStatus"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you expecting absolute paths here? remove

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep we're using absolute paths, and unfortunately, they are all hardcoded to the last persons computer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a better way..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#13

@jerrymarino
Copy link
Collaborator Author

Thanks for the review @rahul-malik - I filed a ticket to rework the sample to a golden file

@jerrymarino jerrymarino merged commit 3a0b17e into master Mar 16, 2018
@jerrymarino jerrymarino deleted the jmarino_xchammer_update_status branch March 16, 2018 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants