Skip to content

Commit

Permalink
compiler plugin Scaladoc: document phase requirement
Browse files Browse the repository at this point in the history
fixes #18381

[Cherry-picked 521ac73]
  • Loading branch information
SethTisue authored and Kordyjan committed Dec 1, 2023
1 parent a98ab08 commit 9995620
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/src/dotty/tools/dotc/plugins/Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ sealed trait Plugin {
/** A standard plugin can be inserted into the normal compilation pipeline */
trait StandardPlugin extends Plugin {
/** Non-research plugins should override this method to return the phases
*
* The phases returned must be freshly constructed (not reused
* and returned again on subsequent calls).
*
* @param options commandline options to the plugin.
* @return a list of phases to be added to the phase plan
Expand All @@ -56,6 +59,9 @@ trait StandardPlugin extends Plugin {
*/
trait ResearchPlugin extends Plugin {
/** Research plugins should override this method to return the new phase plan
*
* Any plugin phases included in the plan must be freshly constructed (not reused
* and returned again on subsequent calls).
*
* @param options commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
* @param plan the given phase plan
Expand Down

0 comments on commit 9995620

Please sign in to comment.