rbs: Update rbs_collection.lock.yaml to load herb's RBS (part 5)#149
Merged
Conversation
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
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.
Background
Final part of the type-error cleanup begun in #144, #145, #147, and #148.
Until now,
bundle exec steep checkhas been silently passing because the locked RBS collection was missingdelegate(the stdlib that herb'ssig/herb/token_list.rbsuses viaclass TokenList < SimpleDelegator). Withoutdelegate, herb's RBS fails to resolveSimpleDelegatorand Steep falls back to treating every herb type asuntyped, hiding all real type errors in this project.Now that all the actual type errors are fixed, regenerate
rbs_collection.lock.yamlso CI exercises herb's RBS rather than the misleading untyped fallback.Changes
rbs_collection.lock.yamlupdated viabin/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 thatrbs collection installpulls in automatically.No source code changes.
Verification
bundle exec rake(rubocop + rspec + steep) passesFollow-ups (out of scope)
rbs_collection.yamlgems: - name: delegateworkaround is still required:bin/rbs collection installdoes not auto-pulldelegatefrom 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 shipssig/manifest.yamldeclaringdelegate(marcoroth/herb#1711) is in the Gemfile.Style/RbsInline/MissingTypeAnnotation: doc_style_and_return_annotationdoes not recognise method-level generic syntax; the workarounds inRuboCopASTTransformerandTailExpressionCollectorare the cleanest fit until rubocop-rbs_inline catches up.parallel.rbsreports aRBS::DuplicatedMethodDefinitionunder--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