Skip to content
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

Recursive dependencies are installed using a subprocess #154

Open
DaniPopes opened this issue Aug 24, 2024 · 3 comments
Open

Recursive dependencies are installed using a subprocess #154

DaniPopes opened this issue Aug 24, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@DaniPopes
Copy link
Contributor

Recursive dependencies are installed using a subprocess:

let mut soldeer = Command::new("forge");
let result = soldeer
.args(["soldeer", "install"])
.current_dir(&dep_dir)
.stdout(Stdio::piped())
.stderr(Stdio::piped());
let status = result.status().expect("Subdependency via Soldeer failed");

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
Copy link
Owner

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

@mario-eth mario-eth added the enhancement New feature or request label Sep 4, 2024
@beeb
Copy link
Collaborator

beeb commented Sep 10, 2024

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.

@beeb beeb self-assigned this Nov 18, 2024
@beeb
Copy link
Collaborator

beeb commented Nov 18, 2024

At the moment, the soldeer_core::install::install_dependencies function doesn't really like recursivity. I tried to modify the install_subdependencies to call install_dependencies but I get an error that some future is not Send: beeb@b46231d

@beeb beeb added the help wanted Extra attention is needed label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants