Skip to content

Conversation

wellnana
Copy link
Contributor

@wellnana wellnana commented Sep 25, 2025

Git always uses forward slashes in submodule config keys, even on Windows, so we need to normalize the path separators before looking up the URL.

This also fixed flaky test.
Might be the reason why the test is failing during #11437 (review) cc @onbjerg

Copy link
Contributor

@yash-atreya yash-atreya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onbjerg onbjerg self-assigned this Sep 29, 2025
@wellnana
Copy link
Contributor Author

Thanks for the review @onbjerg ! I've updated the code per your suggestions - removed the path separator replacement and now rely only on dunce::canonicalize, with the fallback keeping paths as-is.

@wellnana wellnana requested a review from onbjerg September 29, 2025 14:25
@onbjerg
Copy link
Contributor

onbjerg commented Sep 30, 2025

doesn't seem to work

pub fn run(self) -> Result<()> {
let config = self.load_config()?;
let (root, paths, _) = super::update::dependencies_paths(&self.dependencies, &config)?;
let (root, mut paths, _) = super::update::dependencies_paths(&self.dependencies, &config)?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be done inside of the function?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in 613462a

@grandizzy
Copy link
Collaborator

issue here is that the command should be

> git config --get submodule.lib/forge-std.url
https://github.com/foundry-rs/forge-std

but on win path was lib\forge-std hence

git config --get submodule.lib\forge-std.url

returned nothing

@grandizzy grandizzy requested a review from DaniPopes September 30, 2025 18:44
@grandizzy grandizzy dismissed stale reviews from yash-atreya and onbjerg September 30, 2025 18:45

stale

Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you, pending one more review CC @onbjerg

@onbjerg onbjerg merged commit 7cc0f57 into foundry-rs:master Sep 30, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Sep 30, 2025
@jenpaff jenpaff moved this from Done to Completed in Foundry Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

5 participants