10000 Deprecate `StandardPlugin.init` in favor of `initialize` method taking implicit Context by WojciechMazur · Pull Request #20330 · scala/scala3 · GitHub
[go: up one dir, main page]

Skip to content

Deprecate StandardPlugin.init in favor of initialize method taking implicit Context #20330

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 4 commits into from
May 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Annotate StandardPlugin.init with @deprecatedOverriding
  • Loading branch information
WojciechMazur committed May 7, 2024
commit 0106c56c6d3a8bd116ee2b6dde16eca8637ad46c
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/plugins/Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ trait StandardPlugin extends Plugin {
* @param options commandline options to the plugin.
* @return a list of phases to be added to the phase plan
*/
@deprecated("`init` does not allow to access `Context`, use `initialize` instead.", since = "3.5.0")
@deprecatedOverriding("Method 'init' does not allow to access 'Context', use 'initialize' instead.", since = "Scala 3.5.0")
@deprecated("Use 'initialize' instead.", since = "Scala 3.5.0")
def init(options: List[String]): List[PluginPhase] = Nil
Copy link
Contributor Author

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


/** Non-research plugins should override this method to return the phases
Expand Down
0