mario-eth / soldeer

Solidity Package Manager written in rust
MIT License
188 stars 19 forks source link

Recursive dependencies are installed using a subprocess #154

Open DaniPopes opened 2 weeks ago

DaniPopes commented 2 weeks ago

Recursive dependencies are installed using a subprocess:

https://github.com/mario-eth/soldeer/blob/660b6c95e33965e532dabedce30d0e48c5d174bc/src/dependency_downloader.rs#L317-L325

This assumes that there is a forge, that it has a soldeer subcommand, and that it will behave the same as the currently running process.

Obviously this is not ideal since any of those things could be not true, and many more.

mario-eth commented 2 weeks ago

Someone is using the flowing command to install dependencies: forge soldeer install...

So the assumption is correct in this case because otherwise that would have not be triggered. The subprocess is called by a parent process and the subprocess is a clone of the parent basically.

But thanks for bringing into my attention, i have to take care of the case when someone is trying to install a dependency using soldeer cli

beeb commented 2 days ago

Now that we have more flexibility about invoking soldeer with configurable paths, it might be possible to run soldeer install programmatically without calling to the subprocess.