Skip to content

[5.9][Macros] Update plugin search options serialization #66724

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jun 16, 2023

Cherry-pick #66689 and #66722 into release/5.9

  • Explanation: Since [5.9][Macros] Plugin search options group #66678, plugin search compiler options (e.g. -plugin-path, -load-plugin-library) are processed by the order specified in the argument list. But they were still serialized/deserialized in the module grouped by each option kind. That may have caused incorrect plugins loading. This change fix that by updating the serialization. Also, this PR includes plugin search table change which which may improve plugin search performance.
  • Scope: Macro plugin loading.
  • Risk: Low. Plugin search option serialization and lldb support is a new feature for 5.9.
  • Testing: Passed existing test suite
  • Issue: rdar://110903149
  • Reviewer: Ben Barham (@bnbarham), Alexis Laferrière (@xymus)

rintaro added 2 commits June 16, 2023 15:44
Previously plugin search options were serialized for each option kind.
Instead serialize them in the order specified.

(cherry picked from commit 706985d)
Create a 'Kind' enum so that deserialization can use the kind instead of
a string option name.

(cherry picked from commit 6fa0c14)
@rintaro rintaro requested a review from a team as a code owner June 16, 2023 22:47
@rintaro rintaro changed the title 5.9 macros serialization pluginopts [5.9][Macros] Update plugin search options serialization Jun 16, 2023
@rintaro
Copy link
Member Author

rintaro commented Jun 16, 2023

swiftlang/llvm-project#7011
@swift-ci Please test

@rintaro rintaro force-pushed the 5.9-macros-serialization-pluginopts branch from a4adf12 to 9920533 Compare June 16, 2023 23:18
@adrian-prantl
Copy link
Contributor

@rintaro
Copy link
Member Author

rintaro commented Jun 17, 2023

@adrian-prantl Yes, swiftlang/llvm-project#7011 is the corresponding change.

Iterating all options and potential file system access is not great for
every plugin lookup request. Instead, lazily create a single lookup table
keyed by module name.

(cherry picked from commit b8a073c)
@rintaro rintaro force-pushed the 5.9-macros-serialization-pluginopts branch from 9920533 to 586a746 Compare June 20, 2023 16:46
@rintaro
Copy link
Member Author

rintaro commented Jun 20, 2023

swiftlang/llvm-project#7011
@swift-ci Please test

@DougGregor DougGregor merged commit 9e00582 into swiftlang:release/5.9 Jun 20, 2023
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