Skip to content

🐛 kettle-jem: remove overrides of Bundler's built-in git sources when templating Gemfiles - #67

Merged
pboling merged 1 commit into
mainfrom
fix/kettle-jem-strip-builtin-git-sources
Sep 14, 2026
Merged

🐛 kettle-jem: remove overrides of Bundler's built-in git sources when templating Gemfiles#67
pboling merged 1 commit into
mainfrom
fix/kettle-jem-strip-builtin-git-sources

Conversation

@pboling

@pboling pboling commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Problem

#65 removed git_source(:github) { … "git@github.com:…" } from the packaged Gemfile.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 in Gemfile.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_overrides removes git_source(<built-in>) calls (single-line or block form) using the existing Prism ruby_call_records.
  • Applied in finalize_gemfile_template_source (all Gemfile template merges) and ensure_monorepo_root_gemfile_dependencies, next to the existing prohibited-dependency pruning.
  • Non-built-in sources (codeberg, gitlab) are kept.
  • Specs: helper unit spec, managed root Gemfile spec, and an apply_project main-Gemfile spec. CHANGELOG updated.

Verification

  • New examples: 3 examples, 0 failures.
  • 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 on origin/main without this change.
  • RuboCop: no offenses on added lines; RuboCop Gradual lock unchanged.
  • Trial merges with main and 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

…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
@pboling
pboling merged commit a27937d into main Sep 14, 2026
7 checks passed
@pboling
pboling deleted the fix/kettle-jem-strip-builtin-git-sources branch September 14, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant