Skip to content

Add a swift-argument-parser dependency and use it in swift-help #92

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 3 commits into from
Sep 9, 2020

Conversation

owenv
Copy link
Contributor

@owenv owenv commented May 11, 2020

swift-argument-parser needs some CMake fixes before this can land

@owenv owenv force-pushed the help-argument-parser branch from 6a53c11 to f00e739 Compare May 11, 2020 02:33
@owenv
Copy link
Contributor Author

owenv commented May 11, 2020

Tested a cmake build with the change in apple/swift-argument-parser#138 and it seemed to work

@owenv owenv force-pushed the help-argument-parser branch 2 times, most recently from a5b1cde to ffd777d Compare May 11, 2020 02:38
@DougGregor
Copy link
Member

Good idea! To do this, we'll need to update (or add on to) Swift's list of repos to check out (see swiftlang/swift#31664) and the SwiftPM bootstrap script in swiftlang/swift-package-manager#2736.

@owenv owenv force-pushed the help-argument-parser branch from ffd777d to 58bcb0f Compare May 11, 2020 17:15
@DougGregor
Copy link
Member

I'm pulling in swift-argument-parser as a dependency for CI purposes in swiftlang/swift#31664.

@owenv
Copy link
Contributor Author

owenv commented May 11, 2020

@DougGregor Cool, I hadn't seen that SwiftPM PR! I opened apple/swift-argument-parser#139 to update swift-argument-parser cmake and swiftlang/swift-package-manager#2739 in SwiftPM based on your PR. They probably need a little additional work, but should be mostly on the right track.

@natecook1000
Copy link
Member

@owenv This is great! Merged your PR in the argument parser.

We'll want to follow up later to add support for querying help for the other swift tools using swift-help, so that writing e.g. swift help package init gives you the same help as swift package init --help.

@DougGregor
Copy link
Member

I think this is great! Now that the integrated driver is merged into SwiftPM, there are a few steps needed to make this work out:

  • swift-argument-parser will need to tag (0.0.6 or whatever) that includes @owenv 's change
  • update-checkout will need to switch to that tag
  • SwiftPM's bootstrap script will need to build ArgumentParser and pass its location in when building the SwiftDriver

... and then we can merge this

@natecook1000
Copy link
Member

@DougGregor I've tagged an 0.0.6 release for swift-argument-parser that includes @owenv's CMake fixes.

@owenv owenv force-pushed the help-argument-parser branch from 58bcb0f to 285c4ed Compare May 14, 2020 18:43
@owenv
Copy link
Contributor Author

owenv commented May 14, 2020

Thanks @natecook1000, I'll switch update-checkout to start using the new tag and then we should be all set to adopt ArgumentParser!

@DougGregor
Copy link
Member

@owenv apparently the source compatibility suite has another copy of the update-checkout information that will also need updating (ugh)

@owenv
Copy link
Contributor Author

owenv commented May 14, 2020

@DougGregor Thanks for the heads up, I had no idea that had its own config. I just saw this commit: swiftlang/swift-source-compat-suite@8d478f0 , I'll copy that

@owenv owenv force-pushed the help-argument-parser branch from 285c4ed to d2c5c27 Compare June 24, 2020 01:21
@owenv owenv force-pushed the help-argument-parser branch 3 times, most recently from 5647a32 to cda48e6 Compare August 22, 2020 17:36
@owenv owenv marked this pull request as ready for review August 22, 2020 17:41
@owenv
Copy link
Contributor Author

owenv commented Aug 22, 2020

This is up-and-running with swift-argument-parser 0.3.0 now. The current plan is

  1. Merge [update-checkout] Update swift-argument-parser checkout to 0.3.0 swift#33593 and update swift-argument-parser to 0.3.0 swift-source-compat-suite#454 to update update-checkout with the new version tag
  2. Merge Adopt the ArgumentParser library for the command-line tools swift-package-manager#2653 which adopts ArgumentParser in SPM
  3. Merge https://github.com/apple/swift-package-manager/pull/2739/files and this PR to adopt it in the driver

@owenv owenv force-pushed the help-argument-parser branch from cda48e6 to 1f0a62a Compare August 28, 2020 03:59
@owenv
Copy link
Contributor Author

owenv commented Aug 28, 2020

@swift-ci test

@owenv
Copy link
Contributor Author

owenv commented Aug 28, 2020

Once the tests at swiftlang/swift-package-manager#2739 pass, we should be able to merge this 🎉

@owenv owenv requested a review from DougGregor September 5, 2020 00:41
@DougGregor
Copy link
Member

@swift-ci test

@DougGregor DougGregor merged commit 2719bf4 into swiftlang:master Sep 9, 2020
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