Skip to content

[5.6] Fix ArgumentExtractor implementation bug (#4287) #4289

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

Closed
wants to merge 1 commit into from

Conversation

Kyle-Ye
Copy link
Contributor

@Kyle-Ye Kyle-Ye commented Apr 11, 2022

Fix ArgumentExtractor implementation bug

Motivation:

swift-docc-plugin uses the PackagePlugin API and support generate-documentation action.

If we run

swift package --allow-writing-to-directory ./docs \
    generate-documentation --target SymbolKit --output-path ./docs

It will be fine.
However if we run

swift package --allow-writing-to-directory ./docs \
    generate-documentation --target=SymbolKit --output-path ./docs

It will loop infinitely.

And the core reason seems to be the ArgumentExtractor implementation in PackagePlugin Package.

Modifications:

  • Fix the ArgumentExtractor implementation bug
  • Add testExtractOption for ArgumentExtractor

Result:

When using --<name>=<value> form to specify the argument, the Plugin will no long loop infinitely.

Other consideration

I think this should be cherry-picked into release/5.7
But should it be cherry-picked into release/5.6.2?

@Kyle-Ye Kyle-Ye changed the title Fix ArgumentExtractor implementation bug [5.6] Fix ArgumentExtractor implementation bug Apr 11, 2022
@Kyle-Ye Kyle-Ye added the 5.6 label Apr 11, 2022
@Kyle-Ye Kyle-Ye changed the title [5.6] Fix ArgumentExtractor implementation bug [5.6] Fix ArgumentExtractor implementation bug (#4287) Apr 11, 2022
@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Apr 11, 2022

@swift-ci please smoke test

@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Apr 11, 2022

Hello @tomerd (Release manager for release/5.6 swift-package-manager)

Does this meet the merge bar of 5.6.2?

If not, I'll just close it and only cherry-pick this into release/5.7.

@tomerd
Copy link
Contributor

tomerd commented Apr 11, 2022

thanks @Kyle-Ye. will see if we can include it in the next possible window

@abertelrud
Copy link
Contributor

abertelrud commented Apr 18, 2022

Looks like this is already in main (via #4287) as well as release/5.7 (via #4288) so the only remaining question is whether it is a candidate for 5.6.

@abertelrud abertelrud closed this Sep 21, 2022
@Kyle-Ye Kyle-Ye deleted the release/5.6 branch September 22, 2022 02:54
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