https://kotlinlang.org logo
#k2-early-adopters
Title
# k2-early-adopters
z

Zac Sweers

08/07/2022, 9:02 PM
Testing FIR in 1.7.20-Beta and finding the API for reporting diagnostics to be a bit limited. Few things came up • Are there plans to expose these errors in the IDE? Currently I’m not able to find any report of them in the IDE, only build-time • Are there plans to expose a way to add custom error messages to the user? Right now they are opaque reports (see first screenshot) • Currently, if both errors and warnings are reported, only the errors are shown (second screenshot) • Failure to recompile appears to break incremental compilation, or at least reports something about it (also second screenshot) • Are there plans to expose a “quickfix” or similar API to provide fixes to issues being reported? All of this is is from this branch: https://github.com/ZacSweers/redacted-compiler-plugin/compare/z/firTesting?expand=1 Happy to file bug reports or feature requests for the above issues as necessary too!
d

dmitriy.novozhilov

08/08/2022, 9:51 AM
• Are there plans to expose these errors in the IDE? Currently I’m not able to find any report of them in the IDE, only build-time
There is an IDE integration for K2 plugins, but it is implemented only in new IDE plugin which is based on K2 compiler. Right now this plugin can be enabled only in nightly versions of IDEA, but we are considering to add ability to try it for very early adopters
• Are there plans to expose a way to add custom error messages to the user? Right now they are opaque reports (see first screenshot)
KT-53510
Currently, if both errors and warnings are reported, only the errors are shown (second screenshot)
That's interesting. Please report an issue with reproducer (e.g. with sample plugin)
Failure to recompile appears to break incremental compilation, or at least reports something about it (also second screenshot)
IC with plugin was not properly tested yet, so it's also worth to report about it so we have more cases for tests
Are there plans to expose a “quickfix” or similar API to provide fixes to issues being reported?
You can create IDE plugin for your compiler plugin with required quickfixes, like it was with K1 plugins. The main difference that if with K1 you were required to write IDE plugin to enable it in IDE, but with K2 compiler plugins will be enabled automatically, and additional IDE plugin will be needed only if you need to some additional support, like quickfixes
z

Zac Sweers

10/03/2022, 3:28 PM
10 Views