Skip to content

[Macros] Add env variable option to dump exectuable plugin messagings #64407

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
Mar 27, 2023

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 15, 2023

Set SWIFT_DUMP_PLUGIN_MESSAGING env variable to enable it.
Not a compiler option because a plugin can be reused between multiple compiler invocations.

@rintaro rintaro changed the title [Macro] Add env variable option to dump exectuable plugin messagings [Macros] Add env variable option to dump exectuable plugin messagings Mar 15, 2023
@rintaro
Copy link
Member Author

rintaro commented Mar 15, 2023

@swift-ci Please smoke test

@rintaro rintaro marked this pull request as ready for review March 16, 2023 00:05
@rintaro rintaro requested review from bnbarham and removed request for xedin, slavapestov, CodaFi, hborla and zoecarver March 16, 2023 00:06
Comment on lines 114 to 115
const char *dumpMessaging = ::getenv("SWIFT_DUMP_PLUGIN_MESSAGING");
plugin->setDumpMessaging(dumpMessaging != nullptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a compiler option because a plugin can be reused between multiple compiler invocations.

That's only true for sourcekit right? Could we have this as a property on the PluginRegistry? Regular compilations could use either a compilation flag or the env variable and sourcekit just the env variable?

I don't think this really matters though, so if you'd like to keep it the way it is that's fine too.

Copy link
Member Author

@rintaro rintaro Mar 24, 2023

Choose a reason for hiding this comment

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

Made a PluginRegistry's property because accessing getenv for each plugin loading is not necessary.
As for making this a compilation flag, I don't know, just let me keep it a env var.

@rintaro
Copy link
Member Author

rintaro commented Mar 22, 2023

preset=asan
@swift-ci Please test with preset macOS platform

@rintaro rintaro force-pushed the macros-dump-plugin-messaging branch from 1d14f19 to 02ef103 Compare March 24, 2023 22:55
@rintaro
Copy link
Member Author

rintaro commented Mar 24, 2023

@swift-ci Please smoke test

rintaro added 2 commits March 24, 2023 16:39
Set 'SWIFT_DUMP_PLUGIN_MESSAGING' env variable to enable it.
@rintaro rintaro force-pushed the macros-dump-plugin-messaging branch from 02ef103 to d5b8c84 Compare March 24, 2023 23:39
@rintaro
Copy link
Member Author

rintaro commented Mar 24, 2023

@swift-ci Please smoke test

@rintaro rintaro merged commit 02c72cd into swiftlang:main Mar 27, 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.

2 participants