Skip to content

Conversation

rmaz
Copy link
Contributor

@rmaz rmaz commented Sep 4, 2025

Macro search paths are generally absolute paths which will cause non-deterministic output for build systems that build remotely. When the -prefix-serialized-debugging-options flag is set remap the macro search paths as well as the other debug paths.

@rmaz rmaz requested a review from xymus as a code owner September 4, 2025 20:27
Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the macro path in swift module is only used for debugging purpose. Remapping with -debug-prefix-map sounds reasonable to me.

However in long term, we should rethink how all the remapping options are done because the interaction between multiple remapping options are going to be interesting.

@rmaz
Copy link
Contributor Author

rmaz commented Sep 4, 2025

@swift-ci Please smoke test

@rmaz
Copy link
Contributor Author

rmaz commented Sep 4, 2025

I think the macro path in swift module is only used for debugging purpose. Remapping with -debug-prefix-map sounds reasonable to me.

I was also considering disabling this serialization if this is an explicit module build, but couldn't confirm that we didn't need the macro search path logic in the debugger in that case. If we already have the modules built, would we need the macro lookup logic still?

@cachemeifyoucan
Copy link
Contributor

I was also considering disabling this serialization if this is an explicit module build, but couldn't confirm that we didn't need the macro search path logic in the debugger in that case. If we already have the modules built, would we need the macro lookup logic still?

@adrian-prantl probably knows better. The plugin search paths are definitely used to create expression evaluator even for explicit module build, but explicit module build on latest swift should used resolved macro option only. That probably means you can use macro in lldb expression evaluator so we still want them to be there.

@rmaz rmaz force-pushed the noserializepluginpaths branch from c9fa7f0 to e735a24 Compare September 5, 2025 14:27
@rmaz
Copy link
Contributor Author

rmaz commented Sep 5, 2025

@swift-ci Please smoke test

Macro search paths are generally absolute paths which will cause
non-deterministic output for build systems that build remotely.
When the -prefix-serialized-debugging-options flag is set remap
the macro search paths as well as the other debug paths.
@rmaz rmaz force-pushed the noserializepluginpaths branch from e735a24 to 7296b28 Compare September 5, 2025 21:09
@rmaz
Copy link
Contributor Author

rmaz commented Sep 5, 2025

@swift-ci Please smoke test

@cachemeifyoucan
Copy link
Contributor

@swift-ci please test

@cachemeifyoucan
Copy link
Contributor

Trigger full run, since this is debugging related.

@rmaz rmaz merged commit 8eb31a8 into swiftlang:main Sep 8, 2025
5 checks passed
@rmaz rmaz deleted the noserializepluginpaths branch September 8, 2025 13:42
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