-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Description of the feature request:
bazel_dep should gain something like a max_compatibility_level which would allow specifying an upper bound for a dependency. The version would imply the lower compatibility_level.
What underlying problem are you trying to solve with this feature?
Image that rules_apple depends on another module, rules_swift, at version=1.0.0/compatibility_level=1. Then rules_swift makes an API breaking change and bumps to version=2.0.0/compatibility_level=2. In subsequent change to rules_apple it accommodates the new API in a way that it can use either version/compatibility_level of rules_swift. Currently there is no way to declare that in bazel_dep, because bazel_dep(name = "rules_swift", version = "1.0.0") will cause a resolution issue if another dep or the root module declares a dependency on rules_swift 2.0.0, and bazel_dep(name = "rules_swift", version = "2.0.0") will do the same the other way. Ideally it could do this instead: bazel_dep(name = "rules_swift", version = "1.0.0", max_compatibility_level = 2) to say that it supports both.
This is a real problem that I see happening very soon, just with different example rulesets (rules_xcodeproj and rules_apple).
Which operating system are you running Bazel on?
No response
What is the output of bazel info release?
No response
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
No response
Have you found anything relevant by searching the web?
No response