Conversation
| "com.google.truth:truth:0.45", | ||
| "com.google.auto.service:auto-service:1.1.1", | ||
| "com.google.auto.service:auto-service-annotations:1.1.1", | ||
| "com.eed3si9n.jarjar:jarjar:1.17.0", |
There was a problem hiding this comment.
There is a Bazel module for this that we can lean into
| "com.google.auto.service:auto-service:1.1.1", | ||
| "com.google.auto.service:auto-service-annotations:1.1.1", | ||
| "com.eed3si9n.jarjar:jarjar:1.17.0", | ||
| "com.google.auto.value:auto-value:1.11.0", |
There was a problem hiding this comment.
If we drop Dagger we'd be mostly vanilla Kotlin here
| android_sdk_repository_extension = use_extension( | ||
| "@rules_android//rules/android_sdk_repository:rule.bzl", | ||
| "android_sdk_repository_extension", | ||
| dev_dependency = True, |
There was a problem hiding this comment.
Breaks querying @rules_kotlin.
There was a problem hiding this comment.
This ships the cli rules as part of the release. Confusing to say the least.
|
|
||
| # Integration tests reference this repository with paths relative to their fixture workspace. | ||
| # Keep the repository sources as declared test inputs so those paths resolve within runfiles. | ||
| filegroup( |
There was a problem hiding this comment.
Um, this is pretty horrible patch for integration tests. At the least the release archive creates a clean target instead of exporting... well, everything?
| New versions of kotlin that change the API should be added to [versions.bzl](src/main/starlark/repositories/versions.bzl), under `CORE` following the | ||
| existing naming convention. | ||
|
|
||
| Multiple versions of kotlin are not currently handled.(_help wanted_) |
| "com.google.dagger:dagger-compiler:2.57.2", | ||
| "com.google.dagger:dagger-producers:2.57.2", | ||
| "com.google.errorprone:error_prone_annotations:2.23.0", | ||
| "com.google.guava:guava:33.0.0-jre", |
There was a problem hiding this comment.
Guava is a non-trivial dep, and can cause all sorted of havoc when two versions are present in a repo. There is no enforcement to separate multiple maven dependency versions... which leaves a potentially nasty rake in the grass.
| ) | ||
| use_repo(maven, "kotlin_rules_maven", "unpinned_kotlin_rules_maven") | ||
|
|
||
| dev_maven = use_extension( |
There was a problem hiding this comment.
... and now bazel build @rules_kotlin//... breaks as well.
Something that would become a standard target for CI to seed cache. Instead, there ends up being a deep link to the build target, extending the public api.
| } | ||
| } | ||
| } | ||
| val rulesKotlin = workspace.resolve("../..").normalize().toAbsolutePath() |
There was a problem hiding this comment.
A tar archive is much cleaner than adding stack of directories. It's almost RBE antagonistic.
| *commandFlags, | ||
| "@rules_kotlin//...", | ||
| ).onFailThrow() | ||
| listOf( |
There was a problem hiding this comment.
This reruns the unit and integration tests for every example and every bazel version.
2416d0f to
d916a65
Compare
Signed-off-by: Ben Lee <ben@ben.cm>
Signed-off-by: Ben Lee <ben@ben.cm>
Signed-off-by: Ben Lee <ben@ben.cm>
d916a65 to
c50dab7
Compare
Consumers now compile the rules_kotlin tools from source. The release uses the same
MODULE.bazeland build definitions as a development checkout, replacing the precompiled archive and its separate release-only BUILD/MODULE files.Changes
rules_pkg; omit compiled JARs, repository tests, examples, and development tooling.bazel query '@rules_kotlin//...', and have BCR presubmit build the entire published package.Rebased onto
origin/masterat593bfa2c(#1724), resolving conflicts in the removed release-only files, source BUILD files, repository initialization, and README. Updated the new runtime repository tests to loadinitialize.bzl.Release archive size
Measured the precompiled release built from
origin/master(593bfa2c) against this PR's source release:The compressed download is 99.685% smaller (about 317× smaller). Consumers compile the required tools instead of downloading bundled precompiled rules_kotlin tools.
Validation after rebasing
archive_overrideinMODULE.bazel: 188 targets, no errors.@rules_kotlin//...from that external consumer on Bazel 9.2.0: 180 targets, including execution rather than only analysis.