Skip to content
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

IDE support #8

Open
ZacSweers opened this issue Jan 24, 2020 · 10 comments
Open

IDE support #8

ZacSweers opened this issue Jan 24, 2020 · 10 comments
Labels
enhancement New feature or request

Comments

@ZacSweers
Copy link
Owner

Not sure how this works but would be neat to support. Can look at the all-open (or similar) plugins for examples

https://github.com/JetBrains/kotlin/blob/master/plugins/allopen/allopen-ide

@ZacSweers ZacSweers added the enhancement New feature or request label Jan 24, 2020
@ZacSweers
Copy link
Owner Author

It looks like this is somewhat straightforward!

@ZacSweers
Copy link
Owner Author

The iml facet has our plugin options in it

<option name="pluginOptions">
  <array>
    <option value="plugin:redacted-compiler-plugin:enabled=true" />
    <option value="plugin:redacted-compiler-plugin:replacementString=██" />
    <option value="plugin:redacted-compiler-plugin:redactedAnnotation=dev.zacsweers.redacted.sample.Redacted" />
  </array>
</option>

@ZacSweers
Copy link
Owner Author

ZacSweers commented Jan 24, 2020

Well, I take that back. Implementation-wise, it seems quite straightforward. However, Kotlin does not publish idea artifacts. This appears to be why all their external compilers move back to the main kotlin repo when they're productionized, as they rely on these private dependencies.

In short - seems like only first-party plugins are allowed to implement IDE support.

@ZacSweers
Copy link
Owner Author

One possible crazy idea - git submodule the kotlin repo and build against the idea APIs that way.

@romtsn
Copy link

romtsn commented Mar 5, 2020

Or clone the Kotlin repo and publish idea artifacts to maven yourself :) not sure about the legal implications though

@ZacSweers
Copy link
Owner Author

Yeah that's not something I'm going to do

@ZakTaccardi
Copy link

What does IDE support mean in this context? Will the IDE just use the full .toString() and that's the only downside?

@ZacSweers
Copy link
Owner Author

Basically just in decompiled bytecode

@ZacSweers
Copy link
Owner Author

This may be possible in FIR

@apatrida
Copy link

@ZacSweers it should be possible with FIR and you can test with a intellij community build, setting a registry key that allows non-official plugins to load.

see notes here:
https://kotlinlang.slack.com/archives/C7L3JB43G/p1695407727213849

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants