Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: nodejs_repo_host_os_alias produces dangling symlink when Bzlmod is enabled #3720

Open
Wyverald opened this issue Mar 4, 2024 · 2 comments
Labels

Comments

@Wyverald
Copy link
Member

Wyverald commented Mar 4, 2024

What happened?

repository_ctx.symlink("../{node_repository}_{os_name}/bin/node{ext}".format(
node_repository = repository_ctx.attr.user_node_repository_name,
os_name = os_name(repository_ctx),
ext = ext,
), "bin/node" + ext)

This logic fabricates a path into another repo, but the (canonical) name of that repo is different when Bzlmod is enabled.

Ideally this should be fixed by using a label somehow, but it's hard to get right and has the side effect of causing the symlink target repo to be fetched. So maybe just appending _{os_name} to repository_ctx.name is the safest bet.

Version

present on main; only an issue with Bzlmod enabled

How to reproduce

No response

Any other information?

No response

Copy link

github-actions bot commented May 4, 2024

This issue has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs in 30 days. Note as of rules_nodejs v6 the rules_nodejs repository contains only the core nodejs toolchain and @bazel/runfiles package. All rulesets are removed and unmaintained. For alternate rulesets suggestions include https://github.com/aspect-build/rules_js, https://github.com/aspect-build/rules_ts Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

@github-actions github-actions bot added the Can Close? We will close this in 30 days if there is no further activity label May 4, 2024
@Wyverald
Copy link
Member Author

@alexeagle could you confirm if this repo rule is still used (especially by rules_js etc)? If not, we could probably close this.

@github-actions github-actions bot removed the Can Close? We will close this in 30 days if there is no further activity label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant