Repository navigation
feat: 末尾の省略可能引数削除を内部呼び出し証拠で互換分類する - #36
Merged
Merged
Conversation
TypeScript と TSX の一意なトップレベル関数について、残存引数と明示的な戻り値型、 全参照と静的な依存経路を AST で確認してから省略可能な末尾引数削除を分類する。 実際の呼び出し証拠を情報として保持し、未知の参照や動的実行は既存の判定を維持する。 解析一覧を検出処理の寿命に閉じたキャッシュへまとめ、処理量の上限を設ける。 内部呼び出しの互換性と外部利用・実行時動作の保証を区別して説明する。
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
公開関数から末尾の省略可能な引数を削除すると、利用側がその引数を渡していなくても
api.modと impact が hook を停止していました。TS/TSX の一意なトップレベル関数について、残る引数と明示された戻り値型が同じで、確認した直接呼び出しがすべて新しい引数数以内ならcompatible_modified/mod_compat(reason: trailing_optional_params_removed)へ分類します。undefined、spread、関数値、型からの参照、shadow、他の契約変更を区別します。eval等・escaped identifier・曖昧な解決・解析不足では従来の判定を維持します。解析一覧をキャッシュし、ファイル数・容量・AST ノード数の上限も設けます。impact_infoに保持します。既存の引数追加や他の起点の blocking は維持します。保証範囲は解析対象の静的な内部呼び出しで、外部利用や実行時動作の同値性を保証しません。検証: spacing 再現の修正前 FAIL、修正後の新規・既存単体36件と CLI10件の全46件 PASS。fmt、default all-targets clippy、diff、AST impact / review 検査も PASS。全体の最終検査はこの PR の GitHub Actions で行います。
Closes #31