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

Incremental compiler doesn't detect JDK change #2074

Closed
eed3si9n opened this issue Jun 25, 2015 · 3 comments
Closed

Incremental compiler doesn't detect JDK change #2074

eed3si9n opened this issue Jun 25, 2015 · 3 comments
Labels

Comments

@eed3si9n
Copy link
Member

  1. compileOrder := CompileOrder.JavaThenScala
  2. I'm using all Java project
  3. Compile using Java 7
  4. Exit sbt, and change to Java 6
  5. Compile again

It looked like the compiler didn't noticed that the underlying JDK was changed.
I kept getting "Unsupported major.minor version 51.0" on the consuming side.

@retronym
Copy link
Member

retronym commented Jun 2, 2021

Related: sbt/zinc#825

@retronym
Copy link
Member

retronym commented Jun 2, 2021

I suggest that previous products (ie generated class files) should be considered invalid after a JDK change.

@eed3si9n
Copy link
Member Author

eed3si9n commented Jun 2, 2021

sbt does initialize extraIncOptions as follows:

extraIncOptions :== Seq("JAVA_CLASS_VERSION" -> sys.props("java.class.version")),

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

No branches or pull requests

3 participants