Skip to content

[Macros] Ensure plugin process is alive before sending a message #74639

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 1 commit into from
Jun 24, 2024

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jun 21, 2024

loadPluginLibrary plugin message is sent via sendMessageAndWaitWithoutLock() because it's already locked in outer context. When the plugin was crashed right before loadPluginLibrary call, Plugin_spawnIfNeeded was not called and the message just failed to send. This caused confusing error.

Make sure to call Plugin_spawnIfNeeded() before sending a message in sendMessageAndWaitWithoutLock() so the plugin is available for the message.

@rintaro rintaro force-pushed the macros-respawn-before-loadlibrary branch from 0115426 to b383905 Compare June 24, 2024 18:13
@rintaro
Copy link
Member Author

rintaro commented Jun 24, 2024

@swift-ci Please smoke test

@rintaro rintaro marked this pull request as ready for review June 24, 2024 18:14
@rintaro rintaro force-pushed the macros-respawn-before-loadlibrary branch from b383905 to ebc2e87 Compare June 24, 2024 19:59
@rintaro
Copy link
Member Author

rintaro commented Jun 24, 2024

@swift-ci Please smoke test

@rintaro rintaro merged commit 8abdb52 into swiftlang:main Jun 24, 2024
3 checks passed
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.

4 participants