From 3c54e850a32e4250c36bee3f118df977c3e8773d Mon Sep 17 00:00:00 2001 From: "Klaus T. Aehlig" Date: Thu, 27 Jun 2024 16:34:42 +0200 Subject: Update just-import-cargo, update just dependencies, and clean up - With the new naming convention of just-import-cargo, there is no longer the conflict on the file etc/defulta/rust/TARGETS. - With the new version of the upstream rust rules, we can use the defaults target directly, as it fully honors TOOLCHAIN_CONFIG[RUST]. - With that simplification in place, we don't have to point just-import-cargo to rules-rust anymore, as for the default-imported rules, the TOOLCHAIN_CONFIG is honored as well. --- etc/defaults/rust/TARGETS | 3 --- etc/defaults/rust/TARGETS.cargo_import | 3 +++ etc/generate-repos.sh | 7 +++---- etc/repos.json | 13 ++++--------- etc/repos.template.json | 8 +------- 5 files changed, 11 insertions(+), 23 deletions(-) delete mode 100644 etc/defaults/rust/TARGETS create mode 100644 etc/defaults/rust/TARGETS.cargo_import (limited to 'etc') diff --git a/etc/defaults/rust/TARGETS b/etc/defaults/rust/TARGETS deleted file mode 100644 index fe4de0a..0000000 --- a/etc/defaults/rust/TARGETS +++ /dev/null @@ -1,3 +0,0 @@ -{ "defaults": - {"type": "defaults", "base": [["@", "orig-rules", "rust", "defaults"]]} -} diff --git a/etc/defaults/rust/TARGETS.cargo_import b/etc/defaults/rust/TARGETS.cargo_import new file mode 100644 index 0000000..fe4de0a --- /dev/null +++ b/etc/defaults/rust/TARGETS.cargo_import @@ -0,0 +1,3 @@ +{ "defaults": + {"type": "defaults", "base": [["@", "orig-rules", "rust", "defaults"]]} +} diff --git a/etc/generate-repos.sh b/etc/generate-repos.sh index d8cd187..4235fd0 100755 --- a/etc/generate-repos.sh +++ b/etc/generate-repos.sh @@ -9,14 +9,13 @@ readonly ROOT=$(readlink -f $(dirname $0)/..) : ${RULES_RUST_BRANCH:=master} # remove files generated by just-import-cargo -rm -rf etc/deps-rust etc/defaults/rust/TARGETS # common to all cargo imports -rm -f src/rust/cargo/circle/Cargo.lock src/rust/cargo/circle/TARGETS +rm -rf etc/deps-rust etc/defaults/rust/TARGETS.cargo_import # common to all cargo imports +rm -f src/rust/cargo/circle/Cargo.lock src/rust/cargo/circle/TARGETS # crate just-import-git -C ${ROOT}/etc/repos.template.json \ --as rules -b ${RULES_CC_BRANCH} ${RULES_CC_REPO} rules \ | just-import-git -C - \ --as rules-rust -b ${RULES_RUST_BRANCH} ${RULES_RUST_REPO} rules-rust \ - | just-import-cargo --rules rules-rust/nix --repo-root ${ROOT} -rst \ - src/rust/cargo/circle \ + | just-import-cargo --repo-root ${ROOT} -rst src/rust/cargo/circle \ | just-deduplicate-repos \ | hdump > ${ROOT}/etc/repos.json diff --git a/etc/repos.json b/etc/repos.json index 3f419a3..4ac3809 100644 --- a/etc/repos.json +++ b/etc/repos.json @@ -1,7 +1,7 @@ { "repositories": { "": { "repository": {"type": "file", "path": "src"} - , "bindings": {"rules": "rules/nix", "rust": "rules-rust/nix"} + , "bindings": {"rules": "rules/nix", "rust": "rules-rust"} } , "test": { "repository": {"type": "file", "path": "test"} @@ -11,12 +11,6 @@ , "defaults": {"repository": {"type": "file", "path": "etc/defaults"}} , "rules/nix": {"repository": "rules", "target_root": "defaults", "rule_root": "rules"} - , "rules-rust/nix": - { "repository": "rules-rust" - , "target_root": "defaults" - , "rule_root": "rules-rust" - , "target_file_name": "nix.TARGETS" - } , "rules/nix-test": { "repository": "rules" , "target_root": "defaults" @@ -38,7 +32,7 @@ { "type": "git" , "repository": "https://github.com/just-buildsystem/rules-rust" , "branch": "master" - , "commit": "9a4697a2c948a4bcb4a2232a371b6cb3c178e20b" + , "commit": "1a8211bda5c14ef0b2bff3af062c049d5598f02f" , "subdir": "rules" } } @@ -155,7 +149,8 @@ { "repository": "rules-rust" , "target_root": "defaults" , "rule_root": "rules-rust" - , "bindings": {"orig-rules": "rules-rust/nix"} + , "bindings": {"orig-rules": "rules-rust"} + , "target_file_name": "TARGETS.cargo_import" } } } diff --git a/etc/repos.template.json b/etc/repos.template.json index 1b898be..33e6acc 100644 --- a/etc/repos.template.json +++ b/etc/repos.template.json @@ -1,7 +1,7 @@ { "repositories": { "": { "repository": {"type": "file", "path": "src"} - , "bindings": {"rules": "rules/nix", "rust": "rules-rust/nix"} + , "bindings": {"rules": "rules/nix", "rust": "rules-rust"} } , "test": { "repository": {"type": "file", "path": "test"} @@ -11,12 +11,6 @@ , "defaults": {"repository": {"type": "file", "path": "etc/defaults"}} , "rules/nix": {"repository": "rules", "target_root": "defaults", "rule_root": "rules"} - , "rules-rust/nix": - { "repository": "rules-rust" - , "target_root": "defaults" - , "rule_root": "rules-rust" - , "target_file_name": "nix.TARGETS" - } , "rules/nix-test": { "repository": "rules" , "target_root": "defaults" -- cgit v1.2.3