Skip to content

Commit 8c34fba

Browse files
committed
Improve git crate handling
1 parent 908fefe commit 8c34fba

4 files changed

Lines changed: 3495 additions & 190 deletions

File tree

rs/private/downloader.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ def download_metadata_for_git_crates(
333333
package["workspace_cargo_toml_json"] = cargo_toml_json
334334
else:
335335
package["cargo_toml_json"] = cargo_toml_json
336+
if cargo_toml_json.get("workspace"):
337+
package["workspace_cargo_toml_json"] = cargo_toml_json
336338

337339
for source, clone_state in state.pending_git_clones_by_source.items():
338340
clone_dir = mctx.path(_sanitize_path_fragment(source))
@@ -371,6 +373,8 @@ def download_metadata_for_git_crates(
371373
package["cargo_toml_json"] = run_toml2json(mctx, child_cargo_toml_path)
372374
else:
373375
package["cargo_toml_json"] = cargo_toml_json
376+
if cargo_toml_json.get("workspace"):
377+
package["workspace_cargo_toml_json"] = cargo_toml_json
374378

375379
def download_sparse_registry_configs(mctx, state):
376380
# Hardcoded one to avoid the fetch...

0 commit comments

Comments
 (0)