Skip to content

Fixup deprecation warning in PluginContext.Tool initializer #8422

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

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Mar 27, 2025

Setting path directly in the initializer of PluginContext.Tool triggers a deprecation warning, because path is marked as deprecated. Set a private field, and have the deprecated public field use a getter to access it. This resolves the warning.

@plemarquand
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Would you be able to provide more details in the issue description, or ideally code comments that clarify why this change is necessary?

@plemarquand
Copy link
Contributor Author

@MaxDesiatov Done

@plemarquand plemarquand removed the more information needed Issue or PR description not sufficient label Mar 28, 2025
@plemarquand plemarquand changed the title Fixup deprecation warnings in PluginContext.Tool initializer Fixup deprecation warning in PluginContext.Tool initializer Mar 28, 2025
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Thanks!

@plemarquand plemarquand merged commit cb4ba47 into swiftlang:main Mar 28, 2025
5 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.

3 participants