Commit 85390ce
authored
Bazel: Pass nodejs binary path as an environment variable. (#1518)
The current way to derive the binary path relies on a specific name for
the nodejs repository. This blocks migrating to bzlmod, as bzlmod
prefixes repository directories with the module name that created them.
By asking bazel for the path instead we always get the correct path, so
we can work with both bzlmod and WORKSPACE based dependencies at the
same time.
The repository @nodejs, used in the build label, refers to nodejs for
the host platform and is generated by the following macro (wasn't too
obvious to me):
https://github.com/bazel-contrib/rules_nodejs/blob/d19d695275c5fd0d5224ddc7826d9f7f4b8186df/nodejs/repositories.bzl#L452
This is some work towards solving #1509.1 parent 580895a commit 85390ce
File tree
3 files changed
+10
-10
lines changed- bazel/emscripten_toolchain
3 files changed
+10
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 11 | | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
1060 | 1061 | | |
1061 | 1062 | | |
1062 | 1063 | | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1063 | 1068 | | |
1064 | 1069 | | |
1065 | 1070 | | |
| |||
1134 | 1139 | | |
1135 | 1140 | | |
1136 | 1141 | | |
| 1142 | + | |
1137 | 1143 | | |
1138 | 1144 | | |
1139 | 1145 | | |
| |||
0 commit comments