-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Add -Xcompiler-plugin-order compiler option
#5188
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
base: 2-3-0-doc-update
Are you sure you want to change the base?
Conversation
koshachy
left a comment
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.
Overall is good!
Mentioned some ideas so maybe they could help to explain some things more clearly.
Up to you.
|
|
||
| ### -Xcompiler-plugin-order={plugin.before>plugin.after} | ||
|
|
||
| Configure the running order of compiler plugins. Place the compiler plugin you want to run first on the left side of the |
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.
While the sentence is clear and well-written, WDYT if we make it more straightforward?
It is just a random thought:
Configure the running order of compiler plugins. Compiler runs plugin.before first, and then plugin.after.
You can define multiplae ordering rules for three or more plugins. For example:
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.
Or something similar.
WDYT?
It's OK not to take my version :)
| kotlinc -Xcompiler-plugin-order=plugin.middle>plugin.last | ||
| ``` | ||
|
|
||
| This results in the following running order: `plugin.first`, then `plugin.middle`, and finally `plugin.last`. |
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.
Maybe numbered list will show it more clearly?
| | SAM with receiver | `org.jetbrains.kotlin.samWithReceiver` | | ||
| | Serialization | `org.jetbrains.kotlinx.serialization` | | ||
|
|
||
| This running order controls only the backend of compiler plugins and not the frontend. |
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.
Do we have any links that helps to define the diffrence backend and frontend? 🤔
This PR adds the
-Xcompiler-plugin-ordercompiler option for Kotlin 2.3.0.