CI で rake sig と steep check を回す#232
Merged
Merged
Conversation
rurema#231 で sig/ が lib/ の全宣言をカバーし steep check がエラー0・警告0に なったので、退行を防ぐため CI に typecheck ジョブを追加する: - rake rbs:install(rbs_collection.lock.yaml で固定された collection を取得) - rake sig(rbs prototype → rbs subtract の残余ゼロ = sig 網羅の検査 + rbs validate) - steep check Ruby は最新安定版の 3.4 固定(バージョン網羅は build ジョブが担う)。 rbs / steep のバージョンは Gemfile.lock(rbs 3.10.3 / steep 1.9.4)で 再現される。 あわせて doctree と同様に、ドキュメント(doc/・README.md・ChangeLog) だけの変更では既存ジョブ含め CI を回さないようにする。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR rurema#232 の CI で steep check が RBS::DuplicatedDeclaration 48 件で失敗した。 原因は rbs collection install がロックを再解決し、path gem である bitclust-core が sig/ を持つため「gem 同梱 RBS」としてコレクションに 追加されたこと(Using bitclust-core:1.4.0 (.../bitclust/sig))。 steep は Steepfile の signature "sig" とコレクション経由で同じ sig/ を 二重ロードし、interface・type alias・定数の宣言が全て重複扱いになった。 (rake sig の rbs validate はコレクションしか読まないため通過していた) - rbs_collection.yaml: bitclust-core / bitclust-dev / refe2 を ignore し、 再解決しても自分自身を取り込まないようにする - CI: rbs collection install --frozen でロックのとおりに取得する (再解決による gem_rbs_collection の revision の変動も防ぐ) - typecheck の Ruby バージョンのコメントを実態に合わせて修正 (3.4 は「最新安定版」ではなく、rbs/steep のロックを検証した環境) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
CI の typecheck 失敗(steep check の 原因
その結果 steep が Steepfile の 修正
ローカルで |
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.
解決したい問題
#231 で sig/ が lib/ の全宣言をカバーし、
steep checkがエラー 0・警告 0 になりましたが、CI では型検査を回していないため、
今後の変更で sig の追従漏れや型エラーが入っても検出できません。
変更内容
typecheck ジョブの追加
test.yml に
typecheckジョブを追加します(既存ジョブは変更なし):bundle exec rake rbs:install— rbs_collection.lock.yaml で固定された gem_rbs_collection を取得
bundle exec rake sig—rbs prototype rb→rbs subtractの残余ゼロ = sig が lib の全宣言をカバーしていることの検査
(新しいクラス/メソッド/ivar を追加して sig を書き忘れると失敗します)
rbs validatebundle exec steep check— 型エラーで失敗ドキュメントだけの変更で CI を回さない
doctree の ci.yml と同様に、
on:へpaths-ignoreを追加し、doc/・README.md・ChangeLog だけの変更では既存の test / rurema ジョブ含め
ワークフロー全体をスキップ**します(doc/ 配下は設計文書・MARKUP_SPEC 等のみで、
テストフィクスチャやランタイムが参照するファイルはありません)。
備考
3.4 固定です(型検査は1バージョンで十分。バージョン網羅は
build ジョブが担います)
Gemfile で
steep ~> 1.9.0)で固定されており、bundler-cache: trueでそのまま再現されます。rbs のメジャーアップ時に prototype の出力形が
変わっても、lock を更新するまで CI は影響を受けません
rake sigの失敗はErrno::ENOTEMPTY(sig-prototype のrmdir 失敗)として現れます。残余ファイルが sig-prototype/ に残るので、
ローカルで
bundle exec rake sigを実行すると不足分が確認できます検証
rake sig通過・steep checkは "No type error detected" を確認rake rbs:installはこの作業環境のネットワーク制限で最終確認できていないため、CI の初回実行で要確認)
🤖 Generated with Claude Code