-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Deprecate StandardPlugin.init
in favor of initialize
method taking implicit Context
#20330
Merged
WojciechMazur
merged 4 commits into
scala:main
from
WojciechMazur:plugins/init-with-context
May 8, 2024
Merged
Deprecate StandardPlugin.init
in favor of initialize
method taking implicit Context
#20330
WojciechMazur
merged 4 commits into
scala:main
from
WojciechMazur:plugins/init-with-context
May 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WojciechMazur
commented
May 3, 2024
@@ -50,7 +51,19 @@ trait StandardPlugin extends Plugin { | |||
* @param options commandline options to the plugin. | |||
* @return a list of phases to be added to the phase plan | |||
*/ | |||
def init(options: List[String]): List[PluginPhase] | |||
@deprecated("`init` does not allow to access `Context`, use `initialize` instead.", since = "3.5.0") | |||
def init(options: List[String]): List[PluginPhase] = Nil |
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.
I wonder if we should keep it abstract? Otherwise, somebody might forget to override one of the variants. Would still make sense, as most of compiler plugins don't use context yet, so new variant can be treated as extended, advanced variant
sjrd
reviewed
May 3, 2024
sjrd
approved these changes
May 3, 2024
WojciechMazur
force-pushed
the
plugins/init-with-context
branch
from
May 6, 2024 22:54
f37293a
to
413abc1
Compare
…g an implicit Context parameter.
…changes in compiler plugins API
…lugin is build against latest Scala 3 compiler version
WojciechMazur
force-pushed
the
plugins/init-with-context
branch
from
May 7, 2024 12:37
413abc1
to
ceda47f
Compare
WojciechMazur
added
the
needs-minor-release
This PR cannot be merged until the next minor release
label
May 7, 2024
Kordyjan
pushed a commit
that referenced
this pull request
May 10, 2024
…g implicit Context (#20330) We do deprecate `StandardPlugin.init` in favour of `StandardPlugin.initialize` method tak takes additional `Context` parameter - it would e.g. allow to use reporting mechanism when parsing compiler plugin options. Introduces changes to akka/akka fork used in Community Build [Cherry-picked 1276034]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #20185
We do deprecate
StandardPlugin.init
in favour ofStandardPlugin.initialize
method tak takes additionalContext
parameter - it would e.g. allow to use reporting mechanism when parsing compiler plugin options.The old method is no longer abstract - returns empty list of phases instead. New method by default does delegate initialization to old variant to keep source compatibility.
Introduces changes to akka/akka fork used in Community Build: dotty-staging/akka#1 and dotty-staging/akka#2