Open Bencodes opened 1 year ago
Being able to pass in a file for listing dependencies is something we've discussed in order to make bzlmod
support a bit cleaner. The constraint is that we'd like that file to be parseable in Starlark only, since this will be executed in a repository_rule
, and external commands invoked in those are highly dependent on the user's configuration (rather than being part of a potentially hermetic build)
The chances are that a JSON-based syntax will be used, though I can see the attraction of being able to inject Gradle's format, particularly when migrating projects.
I'm planning the approach we could take to handling listing dependencies in an external file. Comments are welcome.
It would be great to support passing
libs.toml
files containing maven coordinates intorules_jvm_external
.Gradle already supports this format: https://docs.gradle.org/current/userguide/platforms.html#sub:conventional-dependencies-toml
I see a few benefits:
dependabot
andrenovate
help manage automatically bumping version updates.MODULE.bazel
with giant lists of maven dependencies.Potential issues:
testonly
,neverlink
, andpackaging (aar|jar|...)
might be harder. Technically this is supported by the Toml format already but we would need to document this.Example: