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

Avoid expiring git sources when unnecessary #6458

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Mar 9, 2023

What was the end-user or developer problem that led to this PR?

I was very confused while writing a regression spec for something else, because Bundler kept expiring the GIT source in the dummy test lockfile I was using and I didn't know why.

Turns out I was writing the lockfile GIT source with a trailing slash, and because of this, Bundler was expiring it because the Gemfile source did not have a trailing slash.

A "style change" like this one should not make Bundler expire a source and the same thing is already handled for GEM sources.

What is your fix for the problem, implemented in this PR?

Properly normalize git sources URIs to not care about trailing slashes.

I initially normalized this to always include a trailing slash in the lockfile, which is what GEM sources do, but that caused a lot of spec failures because currently GIT sources are locked with whatever the Gemfile specifies, and that's usually without a trailing slash.

So for now I'm just making this consistent, but not changing the way most GIT sources are locked.

Make sure the following tasks are checked

Just like gem sources, a "style-only" change, like adding a trailing
slash, should not expire them.
@deivid-rodriguez deivid-rodriguez added this pull request to the merge queue Mar 10, 2023
@deivid-rodriguez deivid-rodriguez changed the title Normalize git sources Avoid expiring git sources when unnecessary Mar 10, 2023
Merged via the queue into master with commit e8ab29c Mar 10, 2023
@deivid-rodriguez deivid-rodriguez deleted the normalize-git-sources branch March 10, 2023 14:31
deivid-rodriguez added a commit that referenced this pull request Mar 20, 2023
Normalize git sources

(cherry picked from commit e8ab29c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants