aspect-build / rules_js

High-performance Bazel rules for running Node.js tools and building JavaScript projects
https://docs.aspect.build/rules/aspect_rules_js
Apache License 2.0
310 stars 107 forks source link

Use canonical repo name for cross-repo `npm_translate_lock` #1876

Closed fmeum closed 3 months ago

fmeum commented 3 months ago

This prevents an error such as the following when trying to run a js_binary defined in another module with Bzlmod:

ERROR: .../external/rules_pyright~/BUILD:6:23: no such package '@@[unknown repo 'rules_pyright~' requested from @@rules_pyright~]//': The repository '@@[unknown repo 'rules_pyright~' requested from @@rules_pyright~]' could not be resolved: No repository visible as '@rules_pyright~' from repository '@@rules_pyright~' and referenced by '@@rules_pyright~//:pyright__entry_point'

Changes are visible to end-users: yes

Fixed an issue when using js_binary from another module with Bzlmod.

Test plan

jbedard commented 3 months ago

Do you have an example of a failure that you can put in a test?

fmeum commented 3 months ago

@jbedard I added a test based on the original reproducer in https://bazelbuild.slack.com/archives/CDCMRLS23/p1722576498988349.