-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ScanDependencies] Get accurate macro dependency #73421
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
[ScanDependencies] Get accurate macro dependency #73421
Conversation
@swift-ci please smoke test |
3bbf662
to
6907c02
Compare
@swift-ci please smoke test |
6907c02
to
cf20ccf
Compare
@swift-ci please smoke test |
cf20ccf
to
2c7dbf1
Compare
@swift-ci please smoke test |
ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting timestamps in the cache key seems really unfortunate; won't this miss any time you rebuild a macro plugin even if it hasn't changed (even if it's cached, the timestamp will change)? We had talked about using the binary UUID on mach-o; not sure if elf/coff has similar concepts; or we could hash the binary -- that might miss dynamic dependencies, but I suspect that's rare for macros.
The timestamp is a prototype that is not actually used in the actual logic. The idea is to find a better identity function when the plugin loader needs to actually verify the plugin status. |
2c7dbf1
to
db7e4ea
Compare
@swift-ci please smoke test |
ping |
I'm not sure I understand -- isn't the implementation using timestamp right now? Are you saying this whole change is prototype, or what's the idea? |
It is a placeholder for future better implementation. The result of the timestamp is actually not used. I can sure remove it. |
db7e4ea
to
0384e36
Compare
@swift-ci please smoke test |
Oh, I might need to completely rewrite this after #73725 |
bce2345
to
d4b8af9
Compare
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Build an accurate macro dependency for swift caching. Specifically, do not include not used macro plugins into the dependency, which might cause false negatives for cache hits. This also builds the foundation for future improvement when dependency scanning will determine the macro plugin to load and swift-frontend do not need to redo the work. rdar://127116512
d4b8af9
to
4125e8c
Compare
@swift-ci please smoke test |
@swift-ci please smoke test windows platform |
Fix few issues from previous implementation from explicit module build with macros and accurate macro dependency scanning in swiftlang#73421. First, there is a crash when propagating the macro dependencies. It turns out that the current macro plugin implementation doesn't need the downstream users to know about the plugin search path from the upstream dependencies. Secondly, fix a bug that the swiftinterface that has macro usage won't build because the build command doesn't inherit the plugin search path option. Finally, add JSON output for macro dependencies so it is easier to debug the macro dependencies. rdar://131214106
Fix few issues from previous implementation from explicit module build with macros and accurate macro dependency scanning in swiftlang#73421. First, there is a crash when propagating the macro dependencies. It turns out that the current macro plugin implementation doesn't need the downstream users to know about the plugin search path from the upstream dependencies. Secondly, fix a bug that the swiftinterface that has macro usage won't build because the build command doesn't inherit the plugin search path option. Finally, add JSON output for macro dependencies so it is easier to debug the macro dependencies. rdar://131214106
Fix few issues from previous implementation from explicit module build with macros and accurate macro dependency scanning in swiftlang#73421. First, there is a crash when propagating the macro dependencies. It turns out that the current macro plugin implementation doesn't need the downstream users to know about the plugin search path from the upstream dependencies. Secondly, fix a bug that the swiftinterface that has macro usage won't build because the build command doesn't inherit the plugin search path option. Finally, add JSON output for macro dependencies so it is easier to debug the macro dependencies. rdar://131214106
Fix few issues from previous implementation from explicit module build with macros and accurate macro dependency scanning in swiftlang#73421. First, there is a crash when propagating the macro dependencies. It turns out that the current macro plugin implementation doesn't need the downstream users to know about the plugin search path from the upstream dependencies. Secondly, fix a bug that the swiftinterface that has macro usage won't build because the build command doesn't inherit the plugin search path option. Finally, add JSON output for macro dependencies so it is easier to debug the macro dependencies. rdar://131214106 (cherry picked from commit da10a02)
Fix few issues from previous implementation from explicit module build with macros and accurate macro dependency scanning in swiftlang#73421. First, there is a crash when propagating the macro dependencies. It turns out that the current macro plugin implementation doesn't need the downstream users to know about the plugin search path from the upstream dependencies. Secondly, fix a bug that the swiftinterface that has macro usage won't build because the build command doesn't inherit the plugin search path option. Finally, add JSON output for macro dependencies so it is easier to debug the macro dependencies. rdar://131214106 (cherry picked from commit da10a02)
Fix few issues from previous implementation from explicit module build with macros and accurate macro dependency scanning in swiftlang#73421. First, there is a crash when propagating the macro dependencies. It turns out that the current macro plugin implementation doesn't need the downstream users to know about the plugin search path from the upstream dependencies. Secondly, fix a bug that the swiftinterface that has macro usage won't build because the build command doesn't inherit the plugin search path option. Finally, add JSON output for macro dependencies so it is easier to debug the macro dependencies. rdar://131214106 (cherry picked from commit da10a02)
Build an accurate macro dependency for swift caching. Specifically, do not include not used macro plugins into the dependency, which might cause false negatives for cache hits.
This also builds the foundation for future improvement when dependency scanning will determine the macro plugin to load and swift-frontend do not need to redo the work.
rdar://127116512