Remove external tool version checks from bundle env#9593
Merged
Conversation
Keeping up with each version manager's invocation convention is not worth the maintenance cost. chruby in particular is wrapped as a shell function and cannot be run as `chruby --version` at all, so the line always reported a missing version. #9528 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies bundle env output by removing the “Tools” section (and the associated external tool version checks) and surfacing the Git version directly in the main “Environment” table, reducing ongoing maintenance for version-manager-specific probing.
Changes:
- Removed
bundle env“Tools” section and helper methods used to probe external tool versions (e.g., rbenv/RVM/chruby). - Moved Git version reporting into the main “Environment” table.
- Updated
spec/bundler/env_spec.rbexpectations to match the new output formatting and removed the deleted helper’s spec.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
bundler/lib/bundler/env.rb |
Removes external tool version probing and relocates Git version reporting into the main environment output. |
spec/bundler/env_spec.rb |
Updates assertions for the new bundle env output formatting and deletes tests for removed helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+102
to
+103
| out << ["Git", git_version] | ||
|
|
Comment on lines
+225
to
226
| expect(described_class.report).to include("Git 1.2.3 (Apple Git-BS)") | ||
| end |
Guards against accidentally reintroducing the removed external tool version output. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`bundle env` no longer reports these gems, so add a `gem list` step before the uninstall instruction. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was the end-user or developer problem that led to this PR?
Keeping up with each version manager's invocation convention is not worth the maintenance cost.
Fixed #9528
If someone still need this, I will create
bundle tool-envplugin or something.What is your fix for the problem, implemented in this PR?
Removed that category and move
Gitversion to main section.Make sure the following tasks are checked