Skip to content

Generate Xcode project at custom path #188

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 1 commit into from
Mar 11, 2016
Merged

Generate Xcode project at custom path #188

merged 1 commit into from
Mar 11, 2016

Conversation

czechboy0
Copy link
Member

Added a switch --xcodeproj-path to customize in which folder swiftpm generates the Xcode project.

  • works for both relative and absolute paths
  • switch shortcut -P
  • pass --xcodeproj-path Foo in project Bar to generate ./Foo/Bar.xcodeproj

@mxcl
Copy link
Contributor

mxcl commented Mar 10, 2016

Probably doesn’t need a switch. In generate mode, if you specify a path, it uses that path.

$ swift build -X
generated: ./SwiftPM.xcodeproj
$ swift build -X foo
generated: foo/SwiftPM.xcodeproj
$ swift build -X foo/bar.xcodeproj
generated: foo/bar.xcodeproj

Thoughts?

edit: though this would require more work with our options parser. I'd accept a less thorough PR though that only checks after the -X.

@czechboy0
Copy link
Member Author

Sure, I prefer being explicit, but I don't have a problem with changing it to what you're proposing. I don't think it'll be more work on the parser than this, tbh.

Should I change it?

@czechboy0
Copy link
Member Author

Okay @mxcl, I simplified it, it's ready.

@mxcl
Copy link
Contributor

mxcl commented Mar 10, 2016

Sure, I prefer being explicit

I understand, but this seems pretty conventional. For example, you don't have to be explicit with git clone:

git clone http://foo/bar.git clonePath

And IMO that would actually benefit from a -o due to there being 2 named parameters, with our single optional named parameter I think it's fairly intuitive.

@mxcl
Copy link
Contributor

mxcl commented Mar 10, 2016

If you could squash the history I'll merge 👍🏻

@czechboy0
Copy link
Member Author

Squashed.

print("")
print("OPTIONS:")
print(" --chdir <value> Change working directory before any other operation [-C]")
print(" --chdir <value Change working directory before any other operation [-C]")
Copy link
Contributor

Choose a reason for hiding this comment

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

mistake ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Great catch, thanks!

@czechboy0
Copy link
Member Author

Shortened the usage information & squashed. Ready for your 👀

@aciidgh
Copy link
Contributor

aciidgh commented Mar 11, 2016

Looks good to me, need CI's approval 😄

@mxcl
Copy link
Contributor

mxcl commented Mar 11, 2016

@swift-ci Please test

mxcl added a commit that referenced this pull request Mar 11, 2016
…e_path

Generate Xcode project at custom path
@mxcl mxcl merged commit bac34ec into swiftlang:master Mar 11, 2016
@czechboy0 czechboy0 deleted the hd/generate_xcodeproj_customize_path branch March 11, 2016 23:29
@mxcl
Copy link
Contributor

mxcl commented Mar 12, 2016

Strictly this does not do:

$ swift build -X foo/bar.xcodeproj
generated: foo/bar.xcodeproj

Which I think would be nice.

@czechboy0
Copy link
Member Author

@mxcl Good point. Fixed by #189.

aciidgh pushed a commit to aciidgh/swift-package-manager that referenced this pull request Jan 11, 2019
[Basic] Adjust tracing APIs to accept 64-bit values.
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.

3 participants