-
Notifications
You must be signed in to change notification settings - Fork 8
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
Generalize JDK versions #24
Comments
So I had an initial stab at this (see #41) and I came across the first obstacle. Fundamentally the problem I am experiencing is that the current way that sbt is structured, it assumes that for every relevant Or put differently, in order to generalize the JDK versions you essentially need an sbt setting that is a Due to this I only see 2 reasonable ways to solve this issue. One is that if we want to support multi-release-jar via this plugin for SBT 1.x.x, we would need to dynamically (i.e. at runtime) create
Since these keys will be dynamic they won't be defined as distinct values in a def generateSbtSettingsForJdkVersion(jdkVersion: Int): Seq[SettingKey] = ???
def generateSbtSettings: Seq[SettingKey[_]] = {
for (8 <- maxSupportedJdkVersion).flatMap {jdkVersion =>
generateSbtSettingForJdkVersion(jdkVersion)
}
} I don't know if this is however even possible, another idea is to dynamically create sbt Thing is I don't even know if this is possible and/or is a good idea, I know that there is a movement to limit the concept of configuration concept for SBT 2 although this may not be an issue because this plugin should only be extending Barring all of this, the second option would be to just add proper native support of multi-release-jar to SBT 2. This would involve making changes to SBT 2 so that it can support having multiple different @eed3si9n @SethTisue wdyt? Feel free to ping anyone else that is relevant, I suspect that if it makes sense to add it to SBT 2.x an SIP (or w/e the equivalent is) would be necessary so it can be properly reviewed? |
Another solution came to mind would be to use a similar technique that is currently done for Initially however this doesn't seem like a good idea, as it exacerbates the already current situation of relying on Yet another option would be to write a Scala 2.12 macro which would at compile time generate a distinct |
This plugin asks for JDK 8 or 11, when future JDK is sufficient to do the build |
The plugins current design happens to use hardcoded JDK versions, even down to sbt keys. While this may have made sense when the plugin was originally designed, ever since then due to changes in how often JDK gets released this isn't very scalable and so its not the best idea to just keep on adding things like sbt keys that are hardcoded against a specific JDK release.
What would be most ideal is if the plugin could just automatically derive the JDK version from the source folders (i.e.
11
fromscala-jdk11
) and handle the rest from there.@eed3si9n @ktoso what do you think?
The text was updated successfully, but these errors were encountered: