Skip to content

Miscellaneous improvements to -help messages #44

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
Jan 1, 2020

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Dec 19, 2019

  • Add "See also" messages from the c++ driver on master
  • Hide options not accepted by the current driver kind
  • update isAccepted(by:) to reject no-driver options in batch & interactive mode

@harlanhaskins
Copy link
Contributor

@swift-ci please test

@owenv
Copy link
Contributor Author

owenv commented Dec 20, 2019

Oops, I missed that failure somehow when running tests locally. It looks like -emit-module-doc-path is listed as a no-driver option right now. I might need to change that in the swift repo and then rerun makeOptions before this can land.

@owenv
Copy link
Contributor Author

owenv commented Dec 29, 2019

I'm dropping the isAccepted(by:) change for now, it looks like it might require a larger refactor. This just includes the first two changes now and is passing tests for me locally.

@harlanhaskins
Copy link
Contributor

@swift-ci please test


OPTIONS:
""")

for option in options {
if option.isAlias { continue }
if option.isHelpHidden && !includeHidden { continue }
guard option.isAccepted(by: driverKind) else { continue }
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still meant to be in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think this is ok. As far as I can tell the current version of the acceptance check only fails to reject some invalid options, it doesn’t reject any valid ones.

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor DougGregor merged commit 96c0438 into swiftlang:master Jan 1, 2020
fengjixuchui referenced this pull request in fengjixuchui/swift-driver Jan 1, 2020
Merge pull request apple#44 from owenv/help-updates
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