Skip to content

rbs: Update rbs_collection.lock.yaml to load herb's RBS (part 5)#149

Merged
tk0miya merged 1 commit into
mainfrom
claude/fix-steep-type-errors-aefxQ
May 24, 2026
Merged

rbs: Update rbs_collection.lock.yaml to load herb's RBS (part 5)#149
tk0miya merged 1 commit into
mainfrom
claude/fix-steep-type-errors-aefxQ

Conversation

@tk0miya

@tk0miya tk0miya commented May 24, 2026

Copy link
Copy Markdown
Owner

Background

Final part of the type-error cleanup begun in #144, #145, #147, and #148.

Until now, bundle exec steep check has been silently passing because the locked RBS collection was missing delegate (the stdlib that herb's sig/herb/token_list.rbs uses via class TokenList < SimpleDelegator). Without delegate, herb's RBS fails to resolve SimpleDelegator and Steep falls back to treating every herb type as untyped, hiding all real type errors in this project.

Now that all the actual type errors are fixed, regenerate rbs_collection.lock.yaml so CI exercises herb's RBS rather than the misleading untyped fallback.

Changes

rbs_collection.lock.yaml updated via bin/rbs collection install. The diff adds:

  • delegate (stdlib) — the essential addition. Without it, herb's RBS doesn't load.
  • not_nilable (rubygems) — the gem added on main in #146; the lock was not regenerated then.
  • dbm, pstore, psych (stdlib) — transitive dependencies that rbs collection install pulls in automatically.

No source code changes.

Verification

  • bundle exec rake (rubocop + rspec + steep) passes
  • Confirms parts 1-4 fully addressed the type errors that surface when herb's RBS is loaded
  • Existing 572 examples / 0 failures

Follow-ups (out of scope)

  • The rbs_collection.yaml gems: - name: delegate workaround is still required: bin/rbs collection install does not auto-pull delegate from the herb gem dependency, so removing the spec entry would drop it from the lock on the next regeneration. It can be removed once a herb release that ships sig/manifest.yaml declaring delegate (marcoroth/herb#1711) is in the Gemfile.
  • Style/RbsInline/MissingTypeAnnotation: doc_style_and_return_annotation does not recognise method-level generic syntax; the workarounds in RuboCopASTTransformer and TailExpressionCollector are the cleanest fit until rubocop-rbs_inline catches up.
  • parallel.rbs reports a RBS::DuplicatedMethodDefinition under --validate=library (herb's vendored sig conflicts with rbs_collection's parser/parallel sig). It is silent under the default --validate=group, so no action is needed unless the CI severity is raised.

https://claude.ai/code/session_01RmbtE71f1Bg92oY8CCL2pn


Generated by Claude Code

Add `delegate` (stdlib) to the locked RBS collection. The herb gem's
sig/herb/token_list.rbs declares `class TokenList < SimpleDelegator`,
which comes from the `delegate` standard library. Without `delegate`
in the collection, Steep cannot resolve `SimpleDelegator` and silently
falls back to treating every herb type as `untyped`, hiding all the
real type errors in this project.

This is the final piece of the type-error cleanup begun in #144 / #145
/ #147 / #148. With this lock update in place, `bin/steep check` will
actually exercise the herb types and surface regressions in CI rather
than the previous misleading "No type error detected" pass.

The other gems added by the lock regeneration are:

  - `not_nilable` (rubygems): the gem was added to the Gemfile on main
    (PR #146) but the lock had not been regenerated yet.
  - `dbm`, `pstore`, `psych` (stdlib): transitive standard-library
    dependencies that `rbs collection install` picks up automatically.

https://claude.ai/code/session_01RmbtE71f1Bg92oY8CCL2pn
@tk0miya tk0miya merged commit 75b7ba5 into main May 24, 2026
5 checks passed
@tk0miya tk0miya deleted the claude/fix-steep-type-errors-aefxQ branch May 24, 2026 08:40
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