Open raon0211 opened 2 years ago
This issue reproduces on master:
Error: expect(received).resolves.toContain(expected) // indexOf
Expected substring: "17"
Received string: "/tmp/tmp-19kplOh1rrrw7q/.yarn/cache/react-npm-16.14.0-932446ec69-8484f3ecb1.zip/node_modules/react/index.js"
at Object.toContain (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0c0da74930.zip/node_modules/expect/build/index.js:202:20)
at module.exports (evalmachine.<anonymous>:79:48)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:57:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:18:16)
at async executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:25:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-ccfa417b92.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:26:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
Self-service
Describe the bug
We have many internal libraries linked through yarn workspaces. Most of them get virtualized properly, and their peer dependencies are correctly resolved.
However, some packages with
link:
s in their dependencies don't get properly virtualized. Problems occur when we refer to the the internal files of the library using thelink:
protocol. Even if the package itself is virtualized, for the dependency withlink:
, yarn uses the real path, not the virtualized path. Therefore, their peer dependencies get broken.I think when yarn virtualizes packages, it has to virtualize the
link:
dependencies of the packages too.To reproduce
Environment
Additional context
Simplified version of our .pnp.cjs