Skip to content

[Macros] Implement compiler plugin type signature requirements #1042

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 2 commits into from
Nov 3, 2022

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Nov 2, 2022

Implement _genericSignature and _typeSignature requirements in _CompilerPlugin. This enables type checking for macro plugins.

Friend PR: swiftlang/swift#61861

Implement `_genericSignature` and `_typeSignature` requirements in `_CompilerPlugin`. This enables type checking for macro plugins.
@rxwei
Copy link
Contributor Author

rxwei commented Nov 2, 2022

swiftlang/swift#61861
@swift-ci please test

1 similar comment
@rxwei
Copy link
Contributor Author

rxwei commented Nov 2, 2022

swiftlang/swift#61861
@swift-ci please test

@rxwei
Copy link
Contributor Author

rxwei commented Nov 2, 2022

swiftlang/swift#61861
@swift-ci please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Nov 2, 2022

swiftlang/swift#61861

@swift-ci test

1 similar comment
@rxwei
Copy link
Contributor Author

rxwei commented Nov 2, 2022

swiftlang/swift#61861

@swift-ci test

rxwei added a commit to swiftlang/swift that referenced this pull request Nov 3, 2022
Type check user-defined macros plugins with user-provided type signatures.

Also, load plugin libraries with `RTLD_LOCAL` instead of `RTLD_GLOBAL` to prevent symbol collision between plugins. `llvm::sys::DynamicLibrary` only supports `RTLD_GLOBAL` so we use the plain `dlopen` instead. This does not work on Windows and needs to be fixed.

Friend PR: swiftlang/swift-syntax#1042
@rxwei rxwei merged commit f2a64d9 into swiftlang:main Nov 3, 2022
@rxwei rxwei deleted the compiler-plugin-type-checking branch November 3, 2022 19:47
meg-gupta pushed a commit to meg-gupta/swift that referenced this pull request Nov 9, 2022
Type check user-defined macros plugins with user-provided type signatures.

Also, load plugin libraries with `RTLD_LOCAL` instead of `RTLD_GLOBAL` to prevent symbol collision between plugins. `llvm::sys::DynamicLibrary` only supports `RTLD_GLOBAL` so we use the plain `dlopen` instead. This does not work on Windows and needs to be fixed.

Friend PR: swiftlang/swift-syntax#1042
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.

2 participants