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

Normalize source urls #115

Closed
Jake-Shadle opened this issue Jan 24, 2020 · 1 comment · Fixed by #274
Closed

Normalize source urls #115

Jake-Shadle opened this issue Jan 24, 2020 · 1 comment · Fixed by #274
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest

Comments

@Jake-Shadle
Copy link
Member

Cargo internally normalizes eg github urls to always strip off the optional .git suffix, as there is no difference between the raw and suffixed url, however, the lockfile and metadata use the url as specified by the user verbatim, which means that urls specified in [sources] must match exactly. We should instead do normalization as well so that the deny config and specification in the user's workspace just have to match on the actual base url, not the entirety.

@Jake-Shadle Jake-Shadle added the enhancement New feature or request label Jan 24, 2020
@Jake-Shadle Jake-Shadle added the good first issue Good for newcomers label Feb 13, 2020
@senden9
Copy link
Contributor

senden9 commented Oct 3, 2020

If we look at https://github.com/rust-lang/cargo/blob/1f6c6bd5e7bbdf596f7e88e6db347af5268ab113/src/cargo/util/canonical_url.rs#L31-L57 we see that cargo does even more normalization.

So do we just want to do the .git stripping or the full normalization dance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest
Projects
None yet
3 participants