Skip to content

[5.9][Macros] Track plugin dependencies #65421

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 4 commits into from
Apr 27, 2023

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Apr 25, 2023

Cherry-pick #65322 (and depending #64845) into release/5.9

Explanation: Plugin dependencies were not tracked in swiftdeps. Because of that, files using plugins (using macros) were not correctly rebuilt even when the plugin implementation was modified. With this change, plugin dependencies (dylib plugins and executable plugins) are tracked by normal DependencyTracker facility just like module file dependencies.
Scope: swiftdeps when plugins are used
Risk: Low-Mid. This adds new elements to existing dependency tracking facility
Testing: Added regression test case for checking plugins are tracked by swiftdeps files
Issue: rdar://104938481
Reviewer: Doug Gregor (@DougGregor), Artem Chikin (@artemcm), Richard Wei (@rxwei), Alex Hoppen (@ahoppen)

llvm-project changes: swiftlang/llvm-project#6720

rintaro added 4 commits April 25, 2023 15:20
`LoadedLibraryPlugin` is currently just a wrapper of `void` pointer from
`dlopen`. This will be convenient for abstracting platform specific
dynamic linrary handling.

(cherry picked from commit f99d70d)
(cherry picked from commit 90e1558)
* Factor out ASTContext plugin loading to newly introduced 'PluginLoader'
* Insert 'DependencyTracker' to 'PluginLoader'
* Add dependencies right before loading the plugins

rdar://104938481
(cherry picked from commit a551c01)
@rintaro rintaro requested a review from a team as a code owner April 25, 2023 22:29
@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2023

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

@rintaro rintaro merged commit 5eb769e into swiftlang:release/5.9 Apr 27, 2023
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants