This repository was archived by the owner on Apr 4, 2025. It is now read-only.
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
src:prodserver fails with when using: --nolegacy_external_runfiles #183
Closed
Description
Using bazel version 0.16.0 on commit e5560ae bazel run --nolegacy_external_runfiles //src:prodserver
fails to launch. The root issue appears to be issue in the nodejs rules and how they resolve paths, but I wanted to start in this project in case I missed something.
Here is a full reproduction:
$ yarn install
...
$ bazel run --nolegacy_external_runfiles //src:prodserver
INFO: Analysed target //src:prodserver (0 packages loaded).
INFO: Found 1 target...
Target //src:prodserver up-to-date:
dist/bin/src/prodserver_bin.sh
dist/bin/src/prodserver
INFO: Elapsed time: 0.450s, Critical Path: 0.01s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
/home/jlisee/.cache/bazel/_bazel_jlisee/a3cee343d71b0f2101c79d88606a48aa/execroot/angular_bazel_example/bazel-out/k8-fastbuild/bin/src/prodserver: line 139: source: filename argument required
source: usage: source filename [arguments]
From my digging it looks like the way paths our resolved in the nodejs rules it needs runtree layout like:
prodserver.runfiles/nodejs/bin/nodejs/bin/node
prodserver.runfiles/nodejs/bin/node
prodserver.runfiles/__main__/external/nodejs/bin/nodejs/bin/node
prodserver.runfiles/__main__/external/nodejs/bin/node
(EDIT NOTE fixed example path below)
Instead of just (which you get with the nolegacy
flag) note the lack of __main__/external
prodserver.runfiles/nodejs/bin/nodejs/bin/node
prodserver.runfiles/nodejs/bin/node