GithubHelp home page GithubHelp logo

Comments (7)

sewe avatar sewe commented on June 10, 2024

FWIW, I am willing to create a pull request.

from tycho.

laeubi avatar laeubi commented on June 10, 2024

Then go ahaed I don't see any reason not to merge it if all tests still pass :-)

The problem could really be the module-info.class as the manifest is generated using BND and this uses the highest classversion by default.

from tycho.

mickaelistria avatar mickaelistria commented on June 10, 2024

Just to make sure: are you certain it's not profitable for your use-case to just fully use Java 11 ? Java 8 compatibility is now an extra cost, so fully getting rid of it could be beneficial for you.
If you want to build a PR for that, please make sure there is some test explicitly covering the Java 8 compatibility story, otherwise, versions may be moved again to Java 11 again later without notice.

from tycho.

sewe avatar sewe commented on June 10, 2024

Just to make sure: are you certain it's not profitable for your use-case to just fully use Java 11 ? Java 8 compatibility is now an extra cost, so fully getting rid of it could be beneficial for you.

We build a plug-in using Tycho that has to support older Eclipse versions as well (well, really old ones like Luna). In particular, we have to support Eclipse versions which do not even launch on Java 11. Hence, we would like to test against such older versions (easily done using an appropriate eclipse-target-definition) on old JREs (using toolchains).

Of course, as soon as JUnit drops Java 8 support, we will have to move on with our tests, at least for the toolchain part, but that hasn’t happened yet. 🤞

The problem could really be the module-info.class as the manifest is generated using BND and this uses the highest classversion by default.

I use the <enforceBytecodeVersion> enforcer rule in my pull request. It will notify you as soon as one of the upstream dependencies rebundled as part of the Surefire Booter or JUnit/TestNG Runner contains bytecode from a more recent Java version (module-info.class and multi-version JAR files’ META-INF/version/**.class excluded). You can then update the execution environment requirement accordingly.

If you want to build a PR for that, please make sure there is some test explicitly covering the Java 8 compatibility story, otherwise, versions may be moved again to Java 11 again later without notice.

Is this enough of a test case? I must admit the whole tycho-its project is a bit convoluted; in particular, I couldn’t find an integration test using a toolchain which I could use for inspiration.

from tycho.

mickaelistria avatar mickaelistria commented on June 10, 2024

Is this enough of a test case?

It's more up to you to consider. I know most of us won't care if this is back to Java 11, so it's all about how much this check makes you feel safe ;)

from tycho.

sewe avatar sewe commented on June 10, 2024

It's more up to you to consider. I know most of us won't care if this is back to Java 11, so it's all about how much this check makes you feel safe ;)

Alright. I added a comment to the bnd.bnd files about this (bf97f0b). That should prevent someone from accidentally switching back to Java 11.

And if JUnit ever decides to switch to a newer bytecode version, the maven-enforcer-plugin will warn us that we will need to update the declared execution-environment requirement.

So from my point of view, pull request #71 is good to go.

from tycho.

mickaelistria avatar mickaelistria commented on June 10, 2024

PR merged, thanks @sewe

from tycho.

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.