Modernize dependencies, fix CI, and add rubocop-gusto#178
Merged
Conversation
CI tests against Ruby 3.2, 3.3, and 4.0. Several gems were incompatible with Ruby 4.0, causing bundle install to fail. Dependency updates: - Remove git-sourced packwerk override from Gemfile (packwerk 3 is on RubyGems) - Update all outdated gems: activesupport 7 → 8.1, rubocop 1.56 → 1.85, sorbet/tapioca 0.5/0.11 → 0.6/0.16, minitest 5.19 → 6.0, code_ownership 1.34 → 2.1.1 (native Rust gem), and many more - Bump required_ruby_version in gemspec from >= 2.6.0 to >= 3.2 - Remove bundler version pin and spoom version pin Linting: - Autocorrect rubocop offenses (block forwarding, collection querying) - Add .rubocop_todo.yml for Naming/BlockForwarding (Sorbet incompatible with anonymous block forwarding) and Naming/PredicateMethod - Update TargetRubyVersion from 2.6.0 to 3.2 Test fixes for updated gem APIs: - code_ownership 2.1.1 (Rust-based): for_file now defaults to from_codeowners: true; pass from_codeowners: false in CodeOwnershipPostProcessor to use pack-based ownership lookup - code_ownership 2.1.1: team YAML files require github.team field - code_ownership 2.1.1: only recognizes top-level owner: key in package.yml, not metadata.owner; update spec_helper write_package_yml to write owner at top level via config hash - code_ownership 2.1.1: remove_file_annotation! regex requires trailing newline; fix test file to include newline - Psych 5: YAML array items no longer indented under parent key; update test expectations Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Update bundler to 4.0.7 (was 2.7.2) and tapioca to 0.17.10 (was
0.16.11), spoom to 1.7.11 (was 1.6.3), rbs to 4.0.0.dev.5 (was
3.10.3) to match updated dependencies
- Add require 'packwerk' to sorbet/tapioca/require.rb so tapioca can
generate a populated packwerk RBI
- Regenerate all gem RBIs via `tapioca gems --all` for updated versions:
- Remove stale RBIs for gems no longer in the lockfile (rubocop-rspec,
rubocop-sorbet, ruby-graphviz)
- Add new RBIs for new gems (addressable, benchmark, better_html,
bigdecimal, byebug, coderay, connection_pool, diff-lcs, drb, erubi,
i18n, io-console, json, json-schema, language_server-protocol,
lint_roller, logger, loofah, mcp, method_source, netrc, nokogiri,
parallel, pastel, prism, pry, pry-byebug, public_suffix, racc,
rails-dom-testing, rails-html-sanitizer, rake, rbi, rbs, reline,
rexml, require-hooks, securerandom, smart_properties, spoom,
tapioca, thor, tsort, tty-color, tty-cursor, tty-reader, tty-screen,
tzinfo, unicode-display_width, unicode-emoji, uri, wisper, yard,
yard-sorbet, zeitwerk) and versioned renames of existing ones
- Fix activesupport, packwerk, rainbow, tty-prompt RBIs with correct
content for new gem versions
- Verify `bundle exec srb tc` passes with no errors
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Gems in https://github.com/sorbet/sorbet/tree/master/rbi/stdlib already have type definitions shipped with sorbet itself, so generating tapioca RBIs for them is redundant. Configure tapioca to exclude these and remove the now-redundant generated RBI files. Excluded: base64, benchmark, bigdecimal, drb, json, logger, racc, reline, rexml, securerandom, tsort, uri Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
dduugg
commented
Mar 5, 2026
| @@ -1801,9 +1801,9 @@ def write_codeownership_config | |||
| enforce_privacy: true | |||
| owner: Bar | |||
| dependencies: | |||
| - packs/apack | |||
Contributor
Author
There was a problem hiding this comment.
These indentation changes are needed due to rubyatscale/parse_packwerk#47
(It would be nice to fix the indentation logic so that it remained yamllint-compatible, I'll look into that separately)
- Add rubocop-gusto to gemspec as a development dependency - Add `plugins: - rubocop-gusto` to .rubocop.yml - Run `rubocop -A` to autocorrect 490 offenses - Regenerate .rubocop_todo.yml for remaining 91 violations that cannot be autocorrected (RSpec/ContextWording, Gusto/NoMetaprogramming, Sorbet/StrictSigil, Sorbet/ConstantsFromStrings, and others) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Add inherit_mode with merge for Exclude and Include arrays so that exclusions from .rubocop_todo.yml and inherit_gem are merged rather than overridden - Add inherit_gem to pull in rubocop-gusto's default.yml configuration - Regenerate .rubocop_todo.yml from scratch Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
rubocop-gusto's Sorbet/BlockMethodDefinition cop autocorrected `def` to `define_method` inside the `no_commands` block in cli.rb, which caused Sorbet to be unable to resolve `exit_successfully` and `parse_pack_names` as methods on Packs::CLI. Revert to plain `def` inside the block (keeping the other good changes: filter_map and delete_suffix) and add cli.rb to the Sorbet/BlockMethodDefinition exclude list in .rubocop_todo.yml. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Remove Layout/LineLength, Layout/MultilineMethodCallIndentation, Layout/FirstArgumentIndentation, Layout/ArgumentAlignment, and Layout/BlockEndNewline from .rubocop.yml, then autocorrect the 113 resulting violations. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…efinition autocorrect Same issue as lib/packs/cli.rb: the Sorbet/BlockMethodDefinition cop converted plain helper defs to define_method inside the RSpec.describe block. Revert to def and add the file to the cop's exclude list. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…s wrapper Thor 1.x treats private methods as non-commands, making the no_commands wrapper redundant. Replacing it with plain private defs satisfies Sorbet/BlockMethodDefinition without resorting to define_method. Naming/BlockForwarding remains excluded for logging.rb and configuration.rb since anonymous & is incompatible with typed Sorbet block parameter sigs. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The rubocop-gusto Sorbet/BlockMethodDefinition autocorrect had converted plain helper defs to define_method inside the RSpec.describe block. Revert to def, move packs_spec.rb from Gusto/NoMetaprogramming to Sorbet/BlockMethodDefinition in .rubocop_todo.yml, and remove its now- unnecessary entry from Gusto/NoMetaprogramming. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
dkisselev
approved these changes
Mar 7, 2026
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.
Summary
CI tests against Ruby 3.2, 3.3, and 4.0 via `rubyatscale/shared-config`. Several gems were incompatible with Ruby 4.0, causing `bundle install` to fail with `minitest-5.19.0 requires ruby version < 4.0`. Also fixes a nokogiri platform lockfile issue.
Follows the same approach as rubyatscale/packwerk-extensions#62.
Dependency updates:
bundle lock --normalize-platformsto fix nokogiri platform lockfile warningrequired_ruby_versionin gemspec from>= 2.6.0to>= 3.2~> 2.2and spoom1.2.1version pins (spoom was pinned for Ruby 2.7 compatibility)Sorbet/Tapioca:
require 'packwerk'tosorbet/tapioca/require.rbso tapioca generates a populated packwerk RBItapioca gems --allfor updated gem versionsLinting:
rubocop-gustoas a development dependency and plugin in.rubocop.ymlinherit_mode(merge Exclude/Include) andinherit_gem: rubocop-gusto: config/default.yml.rubocop_todo.ymlfor remaining violations.rubocop.yml; autocorrect 113 resulting violationsTargetRubyVersionfrom2.6.0to3.2Sorbet/BlockMethodDefinitionautocorrect convertingdeftodefine_methodinside Thorno_commandsand RSpec blocks; exclude those files from the cop and revert to plaindefSorbet/BlockMethodDefinitionincli.rbby removing the redundantno_commands dowrapper (Thor 1.x excludes private methods from CLI commands automatically)Test fixes for updated gem APIs:
code_ownership 2.1.1(Rust-based):for_filenow defaults tofrom_codeowners: true; passfrom_codeowners: falseinCodeOwnershipPostProcessorto use pack-based ownership lookupcode_ownership 2.1.1: team YAML files require agithub.teamfield to be parsed by the Rust enginecode_ownership 2.1.1: only recognizes top-levelowner:key inpackage.yml, notmetadata.owner; updatewrite_package_ymlspec helper to write owner at top level viaconfighashcode_ownership 2.1.1:remove_file_annotation!regex requires a trailing newline; fix test fixture accordinglyTest plan
bundle exec rubocoppasses with no offensesbundle exec srb tcpasses with no errorsFixes https://github.com/rubyatscale/packs/actions/runs/22733988234
🤖 Generated with Claude Code