-
Notifications
You must be signed in to change notification settings - Fork 32
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
Inconsistent tailing slash in remapping name and path #47
Comments
could you please prepare a simple repro for this? |
@mattsse Please check this repo for reproduce this issue: I put some comments in the |
interesting, looks like this affects solc versions < 0.8.8 I think we should remove the trailing / then, in serialization. This makes me think that we actually want the inverse here? if it ends with a /, remove that could you convert this issue into a test and open a PR so we can fix this? |
Sure I can have a PR, but |
adding to this issue, there are few more places where a trailing Lines 178 to 181 in 342f713
Lines 245 to 263 in 342f713
Lines 863 to 866 in 342f713
|
Hi, I notice that when formatting remappings in the compiler settings, a slash
/
is pushed if the remapped path does not end with/
.compilers/src/remappings.rs
Lines 160 to 162 in 6528e4a
This may lead to incorrect path remapping and cause compiler failure.
For example, if the original remapping is
@0x/contracts-utils=/home/cluracan/code/0x-monorepo/node_modules/@0x/contracts-utils
, and one more/
is added at the end.The remapping now becomes:
@0x/contracts-utils=/home/cluracan/code/0x-monorepo/node_modules/@0x/contracts-utils/
.If the contract has one import like this:
import "@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol";
The imported path after remapping is
/home/cluracan/code/0x-monorepo/node_modules/@0x/contracts-utils//contracts/src/v06/LibBytesV06.sol
.Note that there is one redundant
/
in the remapped path and this leads toFile not found errors
in the compiler.I encounter this issue when trying to compile mainnet contract
0xDef1C0ded9bec7F1a1670819833240f027b25EfF
with the source code provided by Etherscan API.The text was updated successfully, but these errors were encountered: