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: file: resolutions aren't supported #268

Closed
paullewis opened this issue Jul 1, 2022 · 4 comments · Fixed by #288
Closed

Bug: file: resolutions aren't supported #268

paullewis opened this issue Jul 1, 2022 · 4 comments · Fixed by #288
Labels
bug Something isn't working
Milestone

Comments

@paullewis
Copy link

paullewis commented Jul 1, 2022

Hey there,

If you have resolutions in your package.json like so:

{
  "resolutions": {
    "ts-log": "file:local/ts-log"
  }
}

And then you have a package that uses – say – ts-log (as per the above), like @graphql-codegen/cli, a build will fail because of the : in the path.

ERROR: app/BUILD.bazel:15:22: //:.aspect_rules_js/node_modules/@graphql-codegen/cli/2.6.4_@types+node@18.0.0/pkg: invalid label ':.aspect_rules_js/node_modules/ts-log/file:local/ts-log/ref' in dict key element: invalid target name '.aspect_rules_js/node_modules/ts-log/file:local/ts-log/ref': target names may not contain ':'

I'm aware #167 was recently fixed, but I'm seeing this in rules_js-1.0.0-rc.1 which AFAICT was released afterwards.

Thanks!

@gregmagolan
Copy link
Member

Hmmm. I didn't try having file: path in resolutions in that fix, just in dependencies. I will TAL when I have some time this week.

@gregmagolan
Copy link
Member

Tried to create a repo but not sure how to repro this one. Could you please make a minimal repro?

@paullewis
Copy link
Author

Absolutely! https://github.com/paullewis/repro-rules-js-issue-268 has a resolutions property set in the package.json and building the //src target triggers the issue.

@gregmagolan
Copy link
Member

gregmagolan commented Jul 14, 2022

Sweet. I see the problem now. Thanks for the repro.

It's the transitive case. Should be a relatively easy fix.

@gregmagolan gregmagolan added bug Something isn't working and removed repro needed labels Jul 14, 2022
@gregmagolan gregmagolan added this to the 1.0 milestone Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants