Giter Club home page Giter Club logo

Comments (6)

olafurpg avatar olafurpg commented on August 27, 2024

I think we can close this issue for now. We use com.sun.source to access certain necessary APIs like com.sun.tools.javac.code.Symbol and com.sun.tools.javac.tree.JCTree. We can revisit this issue when we add support for more Java versions.

from scip-java.

Strum355 avatar Strum355 commented on August 27, 2024

Reopening issue as this is the reason for semanticdb-javac failing with java projects JDK9+ 😅 com.sun.tools.javac.code.Kinds is no longer an enum in JDK9+, with the enum being moved to being an inner class of it. These may further change down the line, so its best we move to supported APIs while we're here 🙂

As part of #90 I will migrate to supported public APIs.

@olafurpg I dont think this will conflict with anything youre working on currently, given youre doing build tool related work, but in the chance that it does, please do go ahead with whats there currently, and I will handle those changes if they arise

from scip-java.

olafurpg avatar olafurpg commented on August 27, 2024

Would it make sense to close this issue as a duplicate of #90? It's an implementation detail IMO if we migrate off com.sun.tools or if we refactor the code to handle the breaking changes. Judging by the compile errors, I suspect we can work around them with fairly minimal diffs.

from scip-java.

Strum355 avatar Strum355 commented on August 27, 2024

Ill take some time today to gather how we might approach this. Im leaving out multi-release JARs for now (the one sbt plugin only supports jdk9 😔 )

Having another look at this, theres at least one non-obvious change, here being one, where Scope.Entry has become private. Worst case we make it public with reflection (but I'd really rather not have to introduce that kinda workaround).
The aforementioned enum changing is perhaps a trickier one, we cant guard that with a runtime flag as it will fail compile time regardless of the jdk we use to compile.

Im personally leaning towards following through with the issue title, I feel itd be the least awkward (Id rather spend time cross-referencing the replacements than messing around with build tooling or version-specific magic), unless you feel strongly about this

from scip-java.

olafurpg avatar olafurpg commented on August 27, 2024

It would be great if we can implement the plugin with public APIs. That would be the best outcome so it's worth exploring.

leaving out multi-release JARs for now (the one sbt plugin only supports jdk9 😔 )

We can ignore multi-release jars for now, it's a future concern.

Worst case we make it public with reflection (but I'd really rather not have to introduce that kinda workaround).

Using setAccessible(true) via reflection would be a fine solution IMO, if it works. I recall that Java 11 is more restrictive with runtime reflection.

from scip-java.

olafurpg avatar olafurpg commented on August 27, 2024

Fixed in #91 🔥

from scip-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.