stevedlawrence commented on issue #1352:
URL:
https://github.com/apache/daffodil-vscode/issues/1352#issuecomment-3357831598
Hmm, good question...
Note that Daffodil 4.0.0 requires Java 17+.
Maybe one option is to remove the `.aggregate(debugger.projectRefs: _*)`
line so it only builds the debugger jars when you explicitly run those tasks,
e.g.
```
sbt debugger2_12/package
```
That might be nice if you're developing/testing and only care about a
specific version--that way you don't have to worry about other versions. As
long as CI ensures builds all three jars that might be fine. And we'd have to
make sure the release process builds all three and bundles them in with the
vsix. So the build config becomes maybe a bit more complex. I don't personally
love this since it feels like it adds complexity to build script and CI/release.
Maybe another option is something like this:
```scala
val debugger = {
val java8projects = (projectMatrix in file("debugger"))
.settings()
.jvmPlatform(scalaVersion = "2.12.20,...)
.jvmPlatform(scalaVersion = "2.13.16,...)
if (isJava17orNewer) {
java8Projects.jvmPlatform(scalaVersion = "3.3.6", ...)
} else {
java8Projects
}
}
```
I'm not sure if that actually works, but the idea is to detect if java is
17+ and if so we add on the Scala 3 platform. As long as we build releases with
17+, it should build all the right jars. And if you locally develop on Java 8
or 11 then you just won't be able to test with Daffodil 4.0.0.
Another option is to just say that if you want to develop the debugger, you
now need to be on Java 17+. That's what we've done with the Daffodil project.
Note that this is only for development. The 2.x jars would still be built with
Java 8 compatibility so users could use them with old versions of Java. And if
users want to debug with Daffodil 4.0.0, they just have to be on Java 17+.
Note that regardless of the option, official releases will need to be built
on java 17 to build all three jars, so we'll need to set `scalacOptions` for
the 2.x platforms to build the jars/classes with Java 8 compatibility and the
3.x jar with java 17 compatibility. I forget the options, but I think Daffodil
had them before we dropped Java 8 support.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]