Repository navigation
Document Gem.loaded_specs for release Gemfile tasks - #98
Merged
Merged
Conversation
Recommend installing the release tasks only when ruby-gem-release is in the active bundle instead of rescuing LoadError, which also hides real load failures in the gem or its dependencies and silently drops the release tasks. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW
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.
The Release Gemfile docs told users to wrap the release task setup in
rescue LoadError. That also swallows a genuine load failure inside ruby-gem-release or its dependencies (e.g. commonmarker), so the release tasks silently disappear and the workflow later fails with a missing task instead of the real error.This replaces it with a Rakefile example that installs the tasks only when
Gem.loaded_specs.key?('ruby-gem-release'), i.e. when the gem is in the active bundle, and explains why.Used in codegram/hyperclient#341: with ruby-gem-release installed globally, the main bundle loads no release tasks and
BUNDLE_GEMFILE=gemfiles/release.gemfileloads them.Validation
bundle exec rubocop(including rubocop-md on the Ruby snippet, rubocop-prose and rubocop-spellcheck): no offenses. Docs-only change.#97 also edits the line before this sentence in
docs/actions/release.md; whichever merges second may need a trivial rebase.🤖 Generated with Claude Code
https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW