-
Notifications
You must be signed in to change notification settings - Fork 540
Create explicit compiler env #4079
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
Conversation
archiveClassifier.set("") | ||
configurations = [project.configurations.shadow] | ||
|
||
minimize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo: tune this list to reduce the size of the shaded artifact, currently 43 MB. (Just to compare, Kotlin is 52 MB: https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.8.20)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With shadow, further size reduction is not possible, because shadow uses artifacts to minimize jars. The biggest jars are lang-impl
(19 MB) and ide-impl
(18 MB). The resulting jar is still 43 MB, but without minimizing it is 67 MB.
b3048e5
to
854d1bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holy shit this is so much nicer, THANK YOU
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one I don't quite understand, we weren't shading it before, were there issues with that setup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to remove all dependencies from the Gradle plugin to have a clean classpath. There is no reason to have JDBC driver on the Gradle classpath.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the JDBC driver specifically it may cause issues if someone currently has a setup where the override the xerial sqlite version locally to test their migrations on a different sqlite version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but now the user just needs to overwrite the version explicitly using the configuration and dependencies:
// build.gradle.kts
val fooDB by sqldelight.databases.registering {
dialect("sqlite")...
}
dependencies {
fooDB.configurationName("my-special-sqlite-driver")
}
Or use similar groovy syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And with classloader isolation, which is enabled since 2.0.0: 077837a#diff-202cb8a4767ef0496a1551b59461db6625ca9aad2ddf92fefc467a07887cfe01, this is the only option to overwrite the driver, or do I miss something?
Fixes #3896
Fixes #3644
Fixes #4088
There is also a new
migration-env
containing the sqlite-jdbc driver for the verify migration task.