確認日: 2026-10-11(JST)。一括編集・再生の統合確認中に見つかった macOS の不具合。
macOS の Table の列ソートは、KeyPathComparator の keyPath を String(describing:) で文字列にし、末尾のプロパティ名からライブラリのソート項目へ変換していた。Release の最適化下では期待する末尾にならず、16列すべてを判別できなかった。Debug だけの確認ではこの条件を見落とす。
KeyPathComparator
String(describing:)
修正では、MediaTableRow.sortField が PartialKeyPath<MediaTableRow> を直接受け取り、16列の keyPath とソート項目を等値比較で対応させる。列の指定は表示用の文字列に依存しない。repository 内を検索し、同じ原因の keyPath 文字列化はこの呼び出し元とテストだけだった。
MediaTableRow.sortField
PartialKeyPath<MediaTableRow>
MediaListRowValueTests.tableSortKeyPathsMapToLibrarySortFields は実 Table と同じ KeyPathComparator<MediaTableRow>.keyPath を渡し、16列の対応と、列のソート項目でない .id が nil を返すことを確認する。修正前の Release 全単体では16 expectations が失敗し、修正後のテストは成功した。この修正直後の Release 全単体804件・129 suite は39.156秒ですべて成功し、全体 SwiftLint も終了0だった。その後のmacOS Debug UIでは、大量曲のソート・検索・選択caseが29.223秒で成功した。Release最適化下の16列mappingの確認と、Debugの画面操作確認を区別する。
MediaListRowValueTests.tableSortKeyPathsMapToLibrarySortFields
KeyPathComparator<MediaTableRow>.keyPath
.id
証跡: /private/tmp/smp-issues-75-76/macos-final-tests.log(修正前)、macos-sort-tests.log(修正後)、lint-sort-final.log。最終 xcresult は .build/Issue75DerivedData/Logs/Test/Test-SimpleMediaPlayer-2026.10.11_12-08-06-+0900.xcresult。
/private/tmp/smp-issues-75-76/macos-final-tests.log
macos-sort-tests.log
lint-sort-final.log
.build/Issue75DerivedData/Logs/Test/Test-SimpleMediaPlayer-2026.10.11_12-08-06-+0900.xcresult
There was an error while loading. Please reload this page.