Skip to content

build(arrow-optics-compiler-plugin): add KEFS markers - #3996

Open
tKe wants to merge 1 commit into
tKe/optics-compiler-plugin-ide-fixesfrom
tKe/optics-compiler-plugin-kefs
Open

tKe wants to merge 1 commit into
tKe/optics-compiler-plugin-ide-fixesfrom
tKe/optics-compiler-plugin-kefs

Conversation

@tKe

@tKe tKe commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Adds the Compiler Plugin DevKit markers to the optics compiler plugin jar (manifest attribute and marker directories), so Kotlin External FIR Support (KEFS) loads it into IntelliJ automatically instead of requiring the global kotlin.k2.only.bundled.compiler.plugins.enabled registry key.

  • Declares support for compilers: 2.4.20 and 2.5.0, covering IJ 262 and 263 (EAP).
  • Still a single build published; the version directories only exist to declare support.
  • KEFS treats each version as a floor, so newer IDEs still get the plugin, flagged as untested.

Note: KEFS's auto-loading is aimed at the not-yet-public DevKit, so this relies on its detection rather than a published contract. KEFS third-party loading requires versions in a form containing both library and kotlin versions, but we only have a single published version (that supports multiple compilers, much like DevKit plugins do).

It should only impact KEFS users and the registry key remains as a fallback as always.

adds metadata and marker files to allow KEFS to auto-load the
`arrow-optics-compiler-plugin`.
@tKe
tKe added this pull request to stack #3997 October 27, 2026 21:03
@tKe
tKe requested a review from serras October 27, 2026 21:05
@kyay10

kyay10 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

I'm very impressed you found this! It was buried in KEFS release notes

To clarify: not only does KEFS support these markers, but upcoming 2026.3 IDE does as well! In fact, I haven't tried it myself, but I've been told the EAPs already support it

Source: I added the markers support!

EDIT: actually, I might be mistaken as to which markers these are. There's new manifest properties that specify an IDE build range that a compiler plugin supports, but I see here that you're using the DevKit META-INF format; I'll check KEFS tomorrow cuz ideally it should be using the manifest properties directly; anyway, if this works with KEFS right now, then I'm happy with shipping it!

@github-actions

Copy link
Copy Markdown
Contributor

Kover Report

Total Project Coverage 48.31%

@tKe

tKe commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

I found this when wanting to get tKe/shush loading in IntelliJ without loading all plugins globally (the registry key) - I'd found KEFS when looking into kx-rpc and found mention of this approach in it's GUIDE.md. The optics plugin loads fine in both 262 and 263-EAP instances I have locally (and with the fixes in the stacked PR, works without error for the basic gradle-test/jvmOnly test project examples).

I hadn't seen the 2026.3+ attributes for explicit support - nice!

It doesn't look like the new attributes conflict with the DevKit/KEFS loading. Having KEFS-based support allows an auto-load path in 262 (and gives additional stability/isolation controls) but adding in Since/Until-Build attributes would mean the 263+ can load without KEFS. The downside is if KEFS unloads the plugin due to incompatibility/instability the IDE may still load it directly resulting in the same errors. We could cap the Until-Build attribute for IJ-based auto-load so KEFS (if installed) can still do it's best-effort unbounded loading with disabling/warning on error as it currently does, and the IDE fallback load only loads if we've explicitly said it's supported.

@tKe
tKe marked this pull request as ready for review October 27, 2026 22:37

This branch has not been deployed

No deployments
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.

2 participants