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

Introduce disable_local_revision_check config #4237

Conversation

rafaelfranca
Copy link
Contributor

This config, in combination with disable_local_branch_check make it
so local.library configuration work in the same way as changing
them Gemfile to point to a path.

This is useful specially in bisect scripts, which will change the HEAD
of the repository to point to a commit that will not include the commit
specified in the Gemfile.lock.

@welcome
Copy link

welcome bot commented Jan 5, 2021

Thanks for opening a pull request and helping make RubyGems and Bundler better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality.

We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below.

If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems or #bundler channel on Slack.

For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide

@rafaelfranca rafaelfranca force-pushed the rm-allow-local-path-to-work-like-gemfile-path branch from 37e9e57 to b15a6f9 Compare January 5, 2021 20:46
This config, in combination with disable_local_branch_check make it
so `local.library` configuration work in the same way as changing
them Gemfile to point to a path.

This is useful specially in bisect scripts, which will change the HEAD
of the repository to point to a commit that will not include the commit
specified in the Gemfile.lock.
@rafaelfranca rafaelfranca force-pushed the rm-allow-local-path-to-work-like-gemfile-path branch from b15a6f9 to 725d22c Compare January 5, 2021 23:27
Copy link
Member

@simi simi left a comment

Choose a reason for hiding this comment

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

Looks good to me.

🤔 To simplify this a little, we can unify both settings to disable checks to one setting key -> disable_local_git_check. But that can be done later if needed.

Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

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

Hi @rafaelfranca, thanks for this!

I'm not sure I understand the reason for this PR very well. I sometimes bisect using bundle config local. and things work just fine for me.

Normally, your configured local path is a clone of the repository you are bisecting, so whatever revision is locked in your lockfile should be present in your local copy and this should pose no issues, right?

I imagine you could run into this issue if your local clone is out of date and the revision in the lockfile pointing the repository clone is not yet present there. In that case, running git fetch on it should fix it, and that's probably better than ignoring the error since otherwise you might not be bisecting against up to date code anyways.

Let me know your thoughts.

Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

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

Well shame on me for not properly reading the description of the PR. You explained the exact kind of situation where this setting could be useful (bisecting scripts that change the HEAD of the repo).

@deivid-rodriguez deivid-rodriguez merged commit 76ce18e into rubygems:master Jan 23, 2021
deivid-rodriguez added a commit that referenced this pull request Jan 26, 2021
…k-like-gemfile-path

Introduce disable_local_revision_check config

(cherry picked from commit 76ce18e)
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

5 participants