Skip to content

[5.7] Fix ArgumentExtractor implementation bug (#4287) #4288

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
Apr 14, 2022

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.

@Kyle-Ye Kyle-Ye changed the base branch from main to release/5.7 April 11, 2022 04:30
@Kyle-Ye Kyle-Ye changed the title [5.7] Fix ArgumentExtractor implementation bug [5.7] 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

@swift-ci please smoke test Linux

1 similar comment
@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Apr 11, 2022

@swift-ci please smoke test Linux

@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Apr 11, 2022

Looks like there is something wrong with “Swift Test Linux Platform(self hosted)”. Cc @abertelrud

@tomerd tomerd added the 5.7 label Apr 11, 2022
@abertelrud
Copy link
Contributor

Here is the error message:

Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getAt java.lang.Object java.lang.String. Administrators can decide whether to approve or reject this signature.

I'll try one more time in case it was transient, otherwise will figure out who to talk to.

@abertelrud
Copy link
Contributor

@swift-ci please smoke test

@abertelrud
Copy link
Contributor

abertelrud commented Apr 12, 2022

Looks like it failed in the same way. @shahmishal does that error look familiar to you? It isn't one that I have seen before.

@abertelrud
Copy link
Contributor

Both the main and release/5.6 PRs passed, so perhaps this is specific to the 5.7 branch? (e.g. #4289 is the 5.6 branch PR)

@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Apr 12, 2022

Here is the error message:

Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getAt java.lang.Object java.lang.String. Administrators can decide whether to approve or reject this signature.

I'll try one more time in case it was transient, otherwise will figure out who to talk to.

This message are occurring in other PR too. (eg. swiftlang/swift-docc#136)
Seems to be a Linux CI bug. Could you help confirm it cc @shahmishal

@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Apr 14, 2022

@swift-ci please smoke test Linux

@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Apr 14, 2022

The Linux CI issue seems to be solved. Once the Linux test is passed, I think we could land it.

@Kyle-Ye Kyle-Ye merged commit 4346366 into swiftlang:release/5.7 Apr 14, 2022
@Kyle-Ye Kyle-Ye deleted the release/5.7 branch April 14, 2022 10:32
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