-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Translate path separators when parsing npm direct imports #6086
base: node-test-runner-e2e-test
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
hardhatTotal size of the bundle: List of dependencies (sorted by size)
|
5fd0ad7
to
a1b136f
Compare
a1b136f
to
d7cb92f
Compare
d7cb92f
to
d4ce6f8
Compare
d4ce6f8
to
0d7adff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great find!
Resolves #6051
The issue was that we used POSIX path separators in the
dependenciesToCompile
, but then we weren't translating them to system-aware paths anywhere along the way. Eventually, it made it all the way through to https://github.com/NomicFoundation/hardhat/blob/v-next/v-next/hardhat-utils/src/fs.ts#L120, which expects system-specific path separators, and that's where we errored out.The resolver for npm paths is https://github.com/NomicFoundation/hardhat/blob/v-next/v-next/hardhat/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.ts#L250. I added the path separator translator to https://github.com/NomicFoundation/hardhat/blob/v-next/v-next/hardhat/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.ts#L254 because it seemed like the most natural option.