🐛 kettle-jem: remove overrides of Bundler's built-in git sources when templating Gemfiles - #67
Merged
Merged
Conversation
…Gemfiles Bundler already defines the github, gist and bitbucket git sources. A destination Gemfile override (for example an SSH git_source(:github) added by an earlier Gemfile template) replaces Bundler's own source and is recorded in Gemfile.lock, where CI cannot clone it. Removing the line from the packaged template does not fix already-templated projects, because the Gemfile merge keeps destination-only statements. Remove such overrides from merged Gemfile templates and from the managed monorepo root Gemfile. Other git sources (codeberg, gitlab) are not Bundler built-ins and are kept. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8aveNcdgPobyMrq8DkD9r
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.
Problem
#65 removed
git_source(:github) { … "git@github.com:…" }from the packagedGemfile.example, but that does not fix projects that were already templated: the Gemfile merge keeps destination-only statements, so every templated project keeps its override. An override of a Bundler built-in git source replaces Bundler's own (HTTPS) source and is recorded inGemfile.lock— e.g.git@github.com:remotes that CI cannot clone (rv clean-install:Permission denied (publickey)).Fix
BUNDLER_BUILTIN_GIT_SOURCES = %w[github gist bitbucket]: sources Bundler already defines.remove_gemfile_builtin_git_source_overridesremovesgit_source(<built-in>)calls (single-line or block form) using the existing Prismruby_call_records.finalize_gemfile_template_source(all Gemfile template merges) andensure_monorepo_root_gemfile_dependencies, next to the existing prohibited-dependency pruning.codeberg,gitlab) are kept.apply_projectmain-Gemfile spec. CHANGELOG updated.Verification
spec/integration/appraisals_and_gemfile_template_spec.rb: 59 examples, 1 failure:generates shunted.gemfile entries from resolved development dependency Ruby floors(Ast::Crispr"Unsupported CRISPR owner scope" in the gemspec merge), which fails identically onorigin/mainwithout this change.mainand with ✨ Detect engine-incompatible dev dependencies (Phase 4) #64 (feat/engine-incompatible-dev-dependency-detection): no conflicts.Not merged; for review.
🤖 Generated with Claude Code
https://claude.ai/code/session_01P8aveNcdgPobyMrq8DkD9r