@@ -11,7 +11,7 @@ load("//misc/bazel/3rdparty/tree_sitter_extractors_deps:defs.bzl", "aliases", "a
11
11
ra_ap_syntax_workspace , _ , _ = str (ra_ap_syntax_label ).partition ("//" )
12
12
13
13
alias (
14
- name = "ungram" ,
14
+ name = "rust. ungram" ,
15
15
actual = "%s//:rust.ungram" % ra_ap_syntax_workspace ,
16
16
visibility = ["//rust/codegen:__pkg__" ],
17
17
)
@@ -45,9 +45,9 @@ codeql_rust_binary(
45
45
exclude = ["src/codegen/**" ],
46
46
) + [":codegen" ],
47
47
aliases = aliases (),
48
- args = ["$(rlocationpath :ungram)" ],
48
+ args = ["$(rlocationpath :rust. ungram)" ],
49
49
compile_data = glob (["src/templates/*.mustache" ]),
50
- data = [":ungram" ],
50
+ data = [":rust. ungram" ],
51
51
proc_macro_deps = all_crate_deps (
52
52
proc_macro = True ,
53
53
),
@@ -69,16 +69,25 @@ write_file(
69
69
# using cat instead of cp to honor default umask
70
70
# (also, macOS does not support `cp --no-preserve=mode`)
71
71
'cat "$(rlocation "$%s")" > "$DST_DIR/%s"' % item
72
- for item in enumerate (_codegen_outs , 2 )
72
+ for item in enumerate (
73
+ ["rust.ungram" ] + _codegen_outs ,
74
+ 2 ,
75
+ )
73
76
],
74
77
is_executable = True ,
75
78
)
76
79
77
80
sh_binary (
78
81
name = "inject-sources" ,
79
82
srcs = [":update" ],
80
- args = ["$(rlocationpath Cargo.toml)" ] + ["$(rlocationpath %s)" % f for f in _codegen_outs ],
81
- data = ["Cargo.toml" ] + _codegen_outs ,
83
+ args = ["$(rlocationpath %s)" % f for f in [
84
+ "Cargo.toml" ,
85
+ ":rust.ungram" ,
86
+ ] + _codegen_outs ],
87
+ data = [
88
+ "Cargo.toml" ,
89
+ ":rust.ungram" ,
90
+ ] + _codegen_outs ,
82
91
deps = ["//misc/bazel:sh_runfiles" ],
83
92
)
84
93
0 commit comments