openzeppelin-sdk icon indicating copy to clipboard operation
openzeppelin-sdk copied to clipboard

Use posix.relative() instead of path.relative()

Open yurenju opened this issue 5 years ago • 2 comments

fixed #1558

in solc-js, file path is used as key to manage dependencies, the contract body is retrieved via file path, so if: import "./Contract2.sol"; appears, solc-js will use "./Contract2.sol" to lookup the body of contract which need to be place into it.

but when we use path.relative() to handle file path, it will transform from "./Contract2.sol" to ".\Contract2.sol" then solc-js cannot find correct contract body, finally throw "File import callback not supported".

so path.posix.relative() should be used in this case to ensure file path follows POSIX rule for a key to index contract body.

yurenju avatar Jun 20 '20 15:06 yurenju

bump?

FrozenKiwi avatar Feb 24 '21 22:02 FrozenKiwi

Hi @FrozenKiwi,

We’ve decided it’s best to focus our upgradeability efforts on the Upgrades Plugins exclusively, and have halted development on the OpenZeppelin CLI.

See: https://forum.openzeppelin.com/t/building-for-interoperability-why-we-re-focusing-on-upgrades-plugins/4088

I recommend using OpenZeppelin Upgrades Plugins: https://docs.openzeppelin.com/upgrades-plugins/1.x/

abcoathup avatar Feb 24 '21 23:02 abcoathup