bazel-contrib / rules_oci

Bazel rules for building OCI containers
Apache License 2.0
305 stars 159 forks source link

rules_oci compatibility_level for 2.0.0 was left un-incremented #703

Open mjcarroll opened 2 months ago

mjcarroll commented 2 months ago

I have a project that specifies in the root MODULE.bazel file:

bazel_dep(name = "rules_oci", version = "1.8.0")

And then in a transitive dependency

bazel_dep(name = "rules_oci", version = "2.0.0")

Because of this, the build continues by resolving the dependency version to "2.0.0" and fails to build because of API changes between 1.8.0 and 2.0.0.

Based on my reading of https://bazel.build/external/module#version-selection, and specifically https://bazel.build/external/module#compatibility_level, the compatibility_level in this location: https://github.com/bazelbuild/bazel-central-registry/blob/f29aeac836566a898885b18fa32a40018501a045/modules/rules_oci/2.0.0/MODULE.bazel#L6 should have been incremented to "2" to reflect the major version with semver.

thesayyn commented 1 month ago

Interesting, i thought bzlmod would select the minimum version. Am i missing something?