Skip to content

Returns Xcode.Project from generate() #1517

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

Merged
merged 10 commits into from
May 9, 2018

Conversation

giginet
Copy link
Contributor

@giginet giginet commented Mar 3, 2018

Motivation

I'd like to test generated Xcode Project on XcodeprojTests.
Currently, Xcodeproj.generate returns only its path.
So we can't investigate contents of the project.

Description

I refactored Xcodeproj related code.
Xcodeproj.generate() returns Xcode.Project object.
Thanks to this change, we can write tests easily.

@giginet
Copy link
Contributor Author

giginet commented Mar 3, 2018

@ikesyo After discussion with you, I introduce buildXcodeprojPath to build a path to Xcode project wrapper directory.
How about this?
Could you check this in your spare time 🙏

@giginet
Copy link
Contributor Author

giginet commented Mar 9, 2018

Could you review anyone?

/// generated project. All ancillary files will be generated inside of the
/// .xcodeproj wrapper directory.
/// wrapper directory is created to the path specified by `xcodeprojPath`
/// Returns the path of the generated project. All ancillary files will
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this comment needs to be updated to say it returns the project object.

@giginet giginet force-pushed the refactor-xcodeproj branch from 33b817d to 388faab Compare April 30, 2018 06:31
@giginet
Copy link
Contributor Author

giginet commented Apr 30, 2018

@hartbit Sorry for my late response.

I've fixed documentation of generate method.
Could you review this again?

@@ -70,10 +72,15 @@ public func generate(
let extraDirs = try findDirectoryReferences(path: srcroot)

/// Generate the contents of project.xcodeproj (inside the .xcodeproj).
var project: Xcode.Project!
Copy link
Contributor

Choose a reason for hiding this comment

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

The pbxproj function could be called here to avoid the IUO.

@giginet
Copy link
Contributor Author

giginet commented May 6, 2018

@hartbit Thanks! your point is good.
I fixed on this commit.

667b992

@hartbit
Copy link
Contributor

hartbit commented May 6, 2018

@swift-ci please smoke test

@hartbit
Copy link
Contributor

hartbit commented May 6, 2018

@aciidb0mb3r This LGTM.

@aciidgh
Copy link
Contributor

aciidgh commented May 9, 2018

Thanks!!

@aciidgh aciidgh merged commit f3a8bd4 into swiftlang:master May 9, 2018
@giginet giginet deleted the refactor-xcodeproj branch May 14, 2018 12:00
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.

4 participants