Skip to content

chore: pin the docs toolchain with a Gemfile so jazzy builds reproducibly - #523

Merged
abelonogov-ld merged 2 commits into
v11from
andrey/pin-docs-gems
Aug 25, 2026
Merged

chore: pin the docs toolchain with a Gemfile so jazzy builds reproducibly#523
abelonogov-ld merged 2 commits into
v11from
andrey/pin-docs-gems

Conversation

@abelonogov-ld

@abelonogov-ld abelonogov-ld commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

build-docs has been failing on every PR since 2026-08-20 — see for example this run — with:

mustache/settings.rb:47:in 'setup_path': undefined method 'map' for an instance of Pathname (NoMethodError)

The cause is dependency resolution, not anything in our source. .github/actions/build-docs ran a bare gem install jazzy with no Gemfile or lockfile, so each run resolved afresh. mustache 1.1.3, published 2026-08-20, reworked template_path=:

# 1.1.2 — accepts a single path, including a Pathname
def self.template_path=(path)
  @template_path = File.expand_path(path)
end

# 1.1.3 — expects a String or an Array
def self.setup_path(path)
  path = path.split(File::PATH_SEPARATOR) if path.is_a? String
  path.map { |p| File.expand_path(p) }
end

jazzy's theme_directory= passes a Pathname, which is neither, so .map raises. jazzy 0.15.4 permits mustache ~> 1.1, so runs started picking up 1.1.3. The failure happens inside Jazzy::Config#parse! while jazzy reads its own configuration, before it looks at any Swift, which is why it reproduces regardless of the branch's contents. It went unnoticed because the last CI run on v11 predates the mustache release.

This adds a Gemfile and a committed Gemfile.lock and switches the action to bundle install / bundle exec jazzy, so the toolchain is pinned rather than re-resolved per run. mustache is held below 1.1.3 with a comment explaining why, to be relaxed once jazzy accommodates the new signature.

Resolved versions: jazzy 0.15.4, mustache 1.1.2.

Test plan

  • bundle lock resolves to mustache 1.1.2, confirmed against the lockfile
  • Verified directly from the 1.1.2 and 1.1.3 gem sources that 1.1.2's template_path= accepts a Pathname and 1.1.3's does not
  • build-docs passes on this PR (2m07s), and the rest of the run is green

Note

Overview
Fixes failing build-docs CI by stopping bare gem install jazzy, which could pull mustache 1.1.3 and break jazzy when it passes a Pathname into template_path=.

Adds a Gemfile pinning jazzy 0.15.4 and mustache < 1.1.3 (with a short comment on the incompatibility). The build-docs composite action now runs bundle install and bundle exec jazzy -o docs. .gitignore ignores /Gemfile.lock, so resolution is driven by the Gemfile constraints rather than a tracked lockfile.

Reviewed by Cursor Bugbot for commit 36b1c4b. Bugbot is set up for automated code reviews on this repo. Configure here.

…ibly

The build-docs action ran a bare `gem install jazzy`, so every run resolved
dependencies afresh. mustache 1.1.3, published 2026-08-20, reworked
`template_path=` to take a String or an Array, while jazzy passes it a
Pathname. jazzy 0.15.4 allows `mustache ~> 1.1`, so runs began picking 1.1.3
up and failing with "undefined method 'map' for an instance of Pathname"
while jazzy parsed its own configuration, before reading any source.

A Gemfile and committed lockfile make the resolution explicit, and hold
mustache below 1.1.3 until jazzy accommodates the new signature.

Co-authored-by: Cursor <cursoragent@cursor.com>
@abelonogov-ld
abelonogov-ld requested a review from a team as a code owner August 21, 2026 20:54
@abelonogov-ld
abelonogov-ld enabled auto-merge (squash) August 21, 2026 21:13
Comment thread Gemfile.lock Outdated
LaunchDarkly SDK repos don't track lockfiles, and the lockfile was not what
fixed the docs build: `bundle install` honors the `mustache < 1.1.3`
requirement whether or not one is checked in. Drop it, ignore it so a local
`bundle install` leaves a clean tree, and name jazzy's version exactly so the
two gems that decide whether jazzy runs are both pinned in the Gemfile.

Co-authored-by: Cursor <cursoragent@cursor.com>
@abelonogov-ld
abelonogov-ld merged commit 8522877 into v11 Aug 25, 2026
19 checks passed
@abelonogov-ld
abelonogov-ld deleted the andrey/pin-docs-gems branch August 25, 2026 13:20
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.

2 participants