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

Update to xcproj 0.4.0 #85

Merged
merged 4 commits into from
Oct 12, 2017
Merged

Update to xcproj 0.4.0 #85

merged 4 commits into from
Oct 12, 2017

Conversation

enmiller
Copy link
Contributor

No description provided.

@yonaskolb
Copy link
Owner

Thanks @enmiller! The tests will need to be updated as well 👍

@enmiller
Copy link
Contributor Author

enmiller commented Oct 11, 2017

@yonaskolb

Two things needed to be done to get the tests to pass again:

  • The GeneratedProject.xcodeproj needed to be opened in Xcode to update the classes array to now be a dictionary

  • I had to modify the Decodable initialization method for PBXProject in the xcproj framework.
    On line 127, the current xcproj 0.4.0 release has

self.projectRoot = try container.decode(.projectRoot)

and I had to change it to

self.projectRoot = try container.decodeIfPresent(.projectRoot)

The reason being that both GeneratedProject and TestProject have the following

/* Begin PBXProject section */
    ...
    projectRoot = "";
    ...
/* End PBXProject section */

The decoder seems to be evaluating this to nil and is throwing an error that fails the FixtureTests

I'll open a PR with xcproj framework (that I know you are also apart of contributing to) and see if/how we can look into the issue with the decoder. I just wanted to provide some context for this project.

Edit
xcproj has resolved the issue and will put out a new build soon. I will test the new release and update this PR assuming everything passes after that.

@enmiller
Copy link
Contributor Author

Here is the console error for the test failure related to projectRoot

-> Test Project
  -> generates

 Test Project generates
  .build/checkouts/Spectre.git--7655155069707042687/Sources/Case.swift:31 Unhandled error: keyNotFound(xcproj.PBXProject.(CodingKeys in _358E3F1E80A5A574E57C81A423F44836).projectRoot, Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key projectRoot (\"projectRoot\").", underlyingError: nil))

@pepicrft
Copy link

Hey @enmiller it was my fault. I'll make a new release today, 0.4.1, that includes that fix, and brings back the BuildSettings typealias.

@pepicrft
Copy link

0.4.1 Released

@yonaskolb
Copy link
Owner

@enmiller, could update to 0.4.1 in this PR, and then run the tests to update the generated fixtures

"revision": "5ac9248b378b5e12201c255ba74caf990d1e0f4b",
"version": "0.3.6"
"revision": "05921531200acff0d8d9caab5ec77b2bcf300b6b",
"version": "0.3.7"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't stop this from updating (still a little new to the SwiftPM). After looking at the Yams repo, it doesn't appear much changed from 0.3.6 to 0.3.7 that would impact XcodeGen.

Copy link
Owner

Choose a reason for hiding this comment

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

That's fine

@yonaskolb yonaskolb merged commit 102d035 into yonaskolb:master Oct 12, 2017
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.

None yet

3 participants