CI: Package.swift と project.yml の依存バージョン一致を検証#26
Merged
Conversation
依存は SwiftPM 用と XcodeGen 用の2箇所で宣言しているが、dependabot は Package.swift しか更新しないため project.yml が取り残される。 pbxproj は project.yml から生成されるので、既存の xcodegen 整合性チェック (xcodegen generate && git diff --exit-code) では食い違いを検出できず、 SwiftPM ビルドと Xcode/配布ビルドで別バージョンが使われる状態が CI 全green のまま成立してしまう (実際に PR #25 がこの状態だった)。 照合スクリプトを追加し lint ジョブの先頭で実行する。ローカルでも ./scripts/check-dependency-versions.sh で同じ検証ができる。 Co-authored-by: Claude Code <claude@anthropic.com>
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.
背景
依存は SwiftPM 用の
Package.swiftと XcodeGen 用のproject.ymlの2箇所で宣言しているが、dependabot はPackage.swiftしか更新しない。pbxproj は
project.ymlから生成されるため、既存の xcodegen 整合性チェック (xcodegen generate && git diff --exit-code) では両者の食い違いを検出できない。結果として「SwiftPM ビルドは 0.8.x、Xcode (=配布物) ビルドは 0.7.x」という状態が CI 全green のまま成立する。実際に #25 (swift-markdown 0.8.0) がこの状態で、マージ前に手動で
project.ymlを追従させる必要があった。今後も同じ穴が空くため機械的に塞ぐ。変更内容
scripts/check-dependency-versions.shを追加。両ファイルから(URL, バージョン)を抽出して照合する抽出に失敗した場合も黙って通さず失敗させる。書式が変わったときに検証が無言で無効化されるのを防ぐため。
検証
ローカルで4パターン確認済み。
🤖 Generated with Claude Code
https://claude.ai/code/session_01YAgg3ad7Muz4ed4EYTgKU2