OpenZeppelin / openzeppelin-sdk

OpenZeppelin SDK repository for CLI and upgrades.js. No longer actively developed.
MIT License
431 stars 200 forks source link

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

Open yurenju opened 4 years ago

yurenju commented 4 years ago

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.

FrozenKiwi commented 3 years ago

bump?

abcoathup commented 3 years ago

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/