bazel-contrib / rules_nodejs

NodeJS toolchain for Bazel.
https://bazelbuild.github.io/rules_nodejs/
Apache License 2.0
733 stars 522 forks source link

fix(runfiles): @bazel/runfiles usage with non-bzlmod repos #3794

Closed jbedard closed 1 month ago

jbedard commented 1 month ago

When in non-bzlmod and no _repo_mapping file exists the logic repo mapping logic should have no side-effects and should take the same code path as before https://github.com/bazel-contrib/rules_nodejs/commit/21b56da9f20c9c5e8b8c1ac19052f1f7cc7b5920

jbedard commented 1 month ago

There still seem to be issues and differences with non-bzlmod in bazel 6 vs 7.

In bazel 7 the _repo_mapping seems to exist with non-bzlmod, but the mappings are essentially no-ops. While in bazel 6 the _repo_mapping does not exist at all. I can't get bazel 6 or 7 working properly with non-bzlmod in the rules_js e2e/runfiles tests.

But I believe @jfirebaugh reports this fix is working so I think it is good to land for now...