Skip to content

crate_universe: error on empty host triples in cargo tree resolver#3979

Merged
illicitonion merged 1 commit intobazelbuild:mainfrom
bdolgov:fix/3907-empty-host-triples-error
Apr 19, 2026
Merged

crate_universe: error on empty host triples in cargo tree resolver#3979
illicitonion merged 1 commit intobazelbuild:mainfrom
bdolgov:fix/3907-empty-host-triples-error

Conversation

@bdolgov
Copy link
Copy Markdown
Contributor

@bdolgov bdolgov commented Apr 19, 2026

When supported_platform_triples contained no platforms with host tools, TreeResolver::execute_cargo_tree would silently produce no cargo tree output, and crate_universe would generate BUILD files with empty crate_features and no optional dependencies. Bail with an actionable error instead, pointing the user at adding Bazel's execution platform triple to supported_platform_triples.

Fixes #3907

When `supported_platform_triples` contained no platforms with host
tools, `TreeResolver::execute_cargo_tree` would silently produce no
`cargo tree` output, and `crate_universe` would generate BUILD files
with empty `crate_features` and no optional dependencies. Bail with an
actionable error instead, pointing the user at adding Bazel's execution
platform triple to `supported_platform_triples`.

Fixes bazelbuild#3907
Copy link
Copy Markdown
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Thank you!

@illicitonion illicitonion enabled auto-merge April 19, 2026 11:18
@illicitonion illicitonion added this pull request to the merge queue Apr 19, 2026
Merged via the queue into bazelbuild:main with commit 4028aa7 Apr 19, 2026
3 checks passed
@bdolgov bdolgov deleted the fix/3907-empty-host-triples-error branch April 19, 2026 11:59
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.

crate_universe silently drops all features and optional deps if there are no triples with host tools in supported_platform_triples

2 participants