-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(forge): update submodules after dependency checkout #7142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, makes sense
pedantic style nit
crates/forge/bin/cmd/install.rs
Outdated
@@ -236,6 +236,9 @@ impl Installer<'_> { | |||
// checkout the tag if necessary | |||
self.git_checkout(&dep, path, false)?; | |||
|
|||
trace!("updating dependency submodules recursively"); | |||
self.git.root(path).submodule_update(false, false, false, true, None::<PathBuf>)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer this if it compiles
self.git.root(path).submodule_update(false, false, false, true, None::<PathBuf>)?; | |
self.git.root(path).submodule_update(false, false, false, true, std::iter::empty::<PathBuf>())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes sense, pending mattsse nit
Motivation
Currently dependencies are being installed in 3 steps:
We need to swap 2 and 3 here as checked out commit might have more submodules than master and vice versa.
Because of that our CI failing right now as when installing forge-std, we are firstly cloning master which don't have ds-test dependency, and then checking out v1.7.6, which has it and requires it to compile normally
cc @mds1