`arrow-intellij` is currently erroring on 263-EAP ...
# arrow-contributors
p
arrow-intellij
is currently erroring on 263-EAP due to removal of
KaSession.diagnostics(KtElement, KaDiagnosticCheckerFilter)
- the replacement API (
KtElement.diagnostics
) isn't available on 261/262. Would it be preferable to rely on reflection or multiple source-sets (or modules) to build against both old and new APIs (switching at runtime)?
a
let me talk to the IDE people to see if there's a better solution. In the meantime, the policy is to support first the stable versions, and when 263 is out, we can bring a new version that supports that one
p
I was going to push a PR that supports 261..263+ but wanted to know a preferred approach (source-set split seems to work fine, and gives type-safety on the new APIs compared to relying on reflection)
a
it seems we can keep 262 compatibility github.com/arrow-kt/arrow-intellij/pull/55
feel free to reuse that, or bring something new; personally I'd prefer a small part based on reflection, since that means we can distribute a single plugin, instead of making it more complicated y having different version targeting different IDE versions
p
github.com/tKe/arrow-intellij/commit/8c0e5a3bbd2f… this was the approach I'd taken to avoid needing multiple builds (it compiles the 263 sourceset against the 263 ide but bundles it all together and only loads that class on 263 - possibly a better way to check the platform/kotlin-plugin version to decide which to use though. probably only worth it if we wanted to use the new API on 263 while still supporting 262 (and 261 in this case)
switching to
element.directDiagnostics
for 262/263 compat is probably enough though if we don't mind dropping 261 support
thank you color 1