-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Virtual paths #2452
Comments
Looking at the implementation in e870ec5 I see it checks for |
Thanks for the feedback!
Yes, that would be very helpful for implementing this. Especially because it sounds like virtual paths interact with manifest path resolution in a specific way.
Sounds good. I will wait to implement these points until yarnpkg/berry#4724 lands and the spec is updated. |
This happens because However, that causes a problem for the
For example, imagine a project with a manifest at I was able to get it to work correctly by modifying esbuild's equivalent behavior for |
Looks like the spec doesn't quite match our implementation, our |
A couple things I noticed:
It seems that the virtual paths aren't present before checking which package owns a path (
FIND_LOCATOR
). As a result, Esbuild detects the wrong parent locator:["@yarnpkg/plugin-stage", "workspace:packages/plugin-stage"]
(it should instead be something like["@yarnpkg/plugin-stage", "virtual:<some hash>"]
)I'm not sure the virtual part of virtual paths is always stripped; cf the following log line, where you can see
.yarn
appearing twice:"/Users/mael.nison/berry/.yarn/__virtual__/@yarnpkg-plugin-stage-virtual-7a1205884d/1/.yarn/__virtual__/@yarnpkg-cli-virtual-ce4dc31355/1/packages/yarnpkg-cli/
packageLocation
fields are always relative to the manifest file, not the importer.To reproduce both of these issues from the Yarn repository:
The text was updated successfully, but these errors were encountered: