solt icon indicating copy to clipboard operation
solt copied to clipboard

Does not work with recursive npm dependencies

Open Joeysantoro opened this issue 3 years ago • 5 comments

importing the UniswapV2Oracle for instance results in the following header at the output of solt write contracts/<contract importing UniswapV2Oracle> --npm: 2 unknown imports found, re-search? even with the --npm flag.

After researching and comparing with other files in our repo, the issue is that the npm dependency has a nested npm dependency

Joeysantoro avatar Mar 27 '21 04:03 Joeysantoro

Hey @Joeysantoro that's an interesting issue! hadn't expected npm deps would have nested npm deps but I can take a look into it, out of curiosity is there a publicly available repo / sample I could test against?

hjubb avatar Mar 28 '21 22:03 hjubb

Hey @hjubb ! Fei Protocol core from this commit has this issue: https://github.com/fei-protocol/fei-protocol-core/tree/badc36a467808184753b6378f976097a25562701. Specifically for the file contracts/oracle/UniswapOracle.sol

Joeysantoro avatar Mar 31 '21 00:03 Joeysantoro

Cheers @Joeysantoro I'll get onto it

hjubb avatar Mar 31 '21 00:03 hjubb

what version of NPM are you using? v7+ may have this solved

sibacha avatar Jul 09 '21 22:07 sibacha

any update on this issue?

fedealconada avatar Apr 18 '22 09:04 fedealconada