Skip to content

Compiler plugins overview#5342

Merged
sarahhaggarty merged 1 commit intomasterfrom
compiler-plugins
Feb 18, 2026
Merged

Compiler plugins overview#5342
sarahhaggarty merged 1 commit intomasterfrom
compiler-plugins

Conversation

@sarahhaggarty
Copy link
Collaborator

This PR adds an overview of Kotlin compiler plugins and what to do if you can't find one that suits your use case.

Reviewed already by Dmitry Novozhilov and Pavel Kunyavskiy.

@sarahhaggarty sarahhaggarty requested a review from zamulla February 2, 2026 13:42
@sarahhaggarty sarahhaggarty requested a review from a team as a code owner February 2, 2026 13:42
Copy link
Contributor

@zamulla zamulla left a comment

Choose a reason for hiding this comment

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

I think I get it! But I left some suggestions on clearing the whole thing up a little more.

Copy link
Contributor

@zamulla zamulla left a comment

Choose a reason for hiding this comment

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

Two inconsequential comments on the current state — next step is for the development section to be separated from the overview.


After that, the compiler generates an Intermediate Representation (IR), which is a data structure the compiler uses as a
bridge between source code and machine code. This IR is progressively lowered into simpler forms and finally translated
into target-specific output, such as JVM bytecode, JavaScript, or native machine code.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would still go for a numbered list here, to ease the matching of the blocks in the picture and comments to them. But I wouldn't go as far as saying that it would be objectively better :)

@sarahhaggarty sarahhaggarty force-pushed the compiler-plugins branch 2 times, most recently from 3d10328 to 66db97e Compare February 17, 2026 15:14
Copy link
Contributor

@zamulla zamulla left a comment

Choose a reason for hiding this comment

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

Thanks! I added a couple of minor polishing suggestions to the final text, but overall I think it works well :)

4. Progressively lowers the IR into simpler forms.
5. Translates the lowered IR into target-specific output, such as JVM bytecode, JavaScript, or native machine code.

![Kotlin compiler stages](compiler-stages-with-plugins.svg){width=650}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put this picture below the paragraphs of "Plugins can...", for a smoother transition — it feels like the text between pictures should explain the differences between them, and right now it doesn't.

@sarahhaggarty sarahhaggarty force-pushed the compiler-plugins branch 2 times, most recently from 8f2d7a7 to e56d11d Compare February 18, 2026 13:08
@sarahhaggarty sarahhaggarty merged commit 1003aeb into master Feb 18, 2026
5 checks passed
@sarahhaggarty sarahhaggarty deleted the compiler-plugins branch February 18, 2026 13:19
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.

4 participants