diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2024-06-24 18:12:44 +0200 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2024-06-25 11:22:48 +0200 |
commit | d1401e45d2bc5033a14366d272971a2973e85762 (patch) | |
tree | 6e20cbd7c3bb07c19e1779f44548a3ea291d8fcb | |
parent | a2521a83bc055e315b2ce0f6cc876a4a5ac80908 (diff) | |
download | rules-rust-d1401e45d2bc5033a14366d272971a2973e85762.tar.gz |
repos.json: split main and testing repositories...
...such that user can just-import-git only the strictly required
repository.
-rw-r--r-- | etc/imports/rules.TARGETS | 2 | ||||
-rw-r--r-- | etc/repos.json | 16 | ||||
-rw-r--r-- | etc/repos.template.json | 16 | ||||
-rw-r--r-- | rules/TARGETS | 4 | ||||
-rw-r--r-- | test/c-from-rust/TARGETS | 2 | ||||
-rw-r--r-- | test/rust-from-c/TARGETS | 2 | ||||
-rw-r--r-- | test/rust-from-c/foo/TARGETS | 4 |
7 files changed, 30 insertions, 16 deletions
diff --git a/etc/imports/rules.TARGETS b/etc/imports/rules.TARGETS index 5b41441..d898f5d 100644 --- a/etc/imports/rules.TARGETS +++ b/etc/imports/rules.TARGETS @@ -1,6 +1,6 @@ { "tree": { "type": "install" - , "dirs": [[["TREE", null, "rules"], "rules"]] + , "dirs": [[["@", "rules-rust", "", "tree"], "rules"]] , "tainted": ["test"] } } diff --git a/etc/repos.json b/etc/repos.json index 936a90b..90e92d4 100644 --- a/etc/repos.json +++ b/etc/repos.json @@ -1,14 +1,20 @@ -{ "main": "rust-rules" +{ "main": "rules-rust" , "repositories": - { "rust-rules": - { "repository": {"type": "file", "path": "."} - , "bindings": {"test-rules": "rules-test", "rules-cc": "rules-cc"} + { "rules-rust": {"repository": {"type": "file", "path": "rules"}} + , "testing": + { "repository": {"type": "file", "path": "test"} + , "bindings": + { "rules-rust": "rules-rust" + , "test-rules": "rules-test" + , "rules-cc": "rules-cc" + } } , "imports": {"repository": {"type": "file", "path": "etc/imports"}} , "test-rules": - { "repository": "rust-rules" + { "repository": "testing" , "target_root": "imports" , "target_file_name": "rules.TARGETS" + , "bindings": {"rules-rust": "rules-rust"} } , "rules-cc": { "repository": diff --git a/etc/repos.template.json b/etc/repos.template.json index 2bf98e9..d6a5e7f 100644 --- a/etc/repos.template.json +++ b/etc/repos.template.json @@ -1,14 +1,20 @@ -{ "main": "rust-rules" +{ "main": "rules-rust" , "repositories": - { "rust-rules": - { "repository": {"type": "file", "path": "."} - , "bindings": {"test-rules": "rules-test", "rules-cc": "rules-cc"} + { "rules-rust": {"repository": {"type": "file", "path": "rules"}} + , "testing": + { "repository": {"type": "file", "path": "test"} + , "bindings": + { "rules-rust": "rules-rust" + , "test-rules": "rules-test" + , "rules-cc": "rules-cc" + } } , "imports": {"repository": {"type": "file", "path": "etc/imports"}} , "test-rules": - { "repository": "rust-rules" + { "repository": "testing" , "target_root": "imports" , "target_file_name": "rules.TARGETS" + , "bindings": {"rules-rust": "rules-rust"} } } } diff --git a/rules/TARGETS b/rules/TARGETS index 0967ef4..ae73742 100644 --- a/rules/TARGETS +++ b/rules/TARGETS @@ -1 +1,3 @@ -{} +{ "tree": + {"type": "install", "deps": [["TREE", null, "."]], "tainted": ["test"]} +} diff --git a/test/c-from-rust/TARGETS b/test/c-from-rust/TARGETS index 7da2055..9bec7d9 100644 --- a/test/c-from-rust/TARGETS +++ b/test/c-from-rust/TARGETS @@ -1,5 +1,5 @@ { "main": - { "type": ["rules/rust", "binary"] + { "type": ["@", "rules-rust", "rust", "binary"] , "name": ["main"] , "crate_root": ["main.rs"] , "deps": [["./", "clib", "foo"]] diff --git a/test/rust-from-c/TARGETS b/test/rust-from-c/TARGETS index 1cb8019..22230e6 100644 --- a/test/rust-from-c/TARGETS +++ b/test/rust-from-c/TARGETS @@ -6,7 +6,7 @@ , "private-deps": [["./", "foo", "foo"]] } , "test_foo": - { "type": ["rules/rust", "test"] + { "type": ["@", "rules-rust", "rust", "test"] , "name": ["test_foo"] , "crate_root": ["foo/foo_test.rs"] , "stage": ["test_foo"] diff --git a/test/rust-from-c/foo/TARGETS b/test/rust-from-c/foo/TARGETS index 17c66ba..5a3e43c 100644 --- a/test/rust-from-c/foo/TARGETS +++ b/test/rust-from-c/foo/TARGETS @@ -1,5 +1,5 @@ { "foo": - { "type": ["rules/rust", "library"] + { "type": ["@", "rules-rust", "rust", "library"] , "name": ["foo"] , "crate_root": ["foo.rs"] , "c_hdrs": ["foo.h"] @@ -7,7 +7,7 @@ , "deps": ["bar"] } , "bar": - { "type": ["rules/rust", "library"] + { "type": ["@", "rules-rust", "rust", "library"] , "name": ["bar"] , "crate_root": ["bar.rs"] , "stage": ["bar"] |