Skip to content

Conversation

@clementguillot
Copy link

@clementguillot clementguillot commented Jan 12, 2026

Changes

Some project that are using bazel can use MODULE.bazel to manage their Crate dependencies, without having a Cargo.toml file in their repo.
Renovate should be add to extract Cargo dependencies within MODULE.bazel.

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository: clementguillot/testbazel#13

Under bazel-module (1) section, you can find 3 Cargo dependencies: axum, tokio and tower.
PR from this version of Renovate: clementguillot/testbazel#14

@clementguillot clementguillot marked this pull request as draft January 13, 2026 13:18
@clementguillot clementguillot changed the title feat(bazel-module): add Cargo dependency extraction feat(bazel-module): add Crate dependency extraction Jan 14, 2026
@clementguillot clementguillot marked this pull request as ready for review January 14, 2026 15:17
@viceice
Copy link
Member

viceice commented Jan 28, 2026

conflictet

@clementguillot
Copy link
Author

fixed


const dep: PackageDependency<CargoManagerData> = {
datasource: CrateDatasource.id,
versioning: 'semver',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
versioning: 'semver',

why? crate datasource is setting crate versioning which is a little different than semver

override defaultVersioning = cargoVersioning.id;

path = "/var/crate",
)
crate.spec(
package = "no_version_crate",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work on bazel? if yes it should set no version instead of invalid

```

```starlark
crate_1 = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear, is this supported or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants