Skip to content

Build with the macOS 27 SDK, whose Foundation adds ProgressReporter - #5

Open
qoo-oji wants to merge 1 commit into
shelfsmith:mainfrom
qoo-oji:fix-progress-reporter-name-clash
Open

qoo-oji wants to merge 1 commit into
shelfsmith:mainfrom
qoo-oji:fix-progress-reporter-name-clash

Conversation

@qoo-oji

@qoo-oji qoo-oji commented Oct 19, 2026 •

Copy link
Copy Markdown

この PR は、StackNest から qooViewer へ渡した本に qooViewer の機能をより多く使えるようにする拡張(下の「関連する PR」)を作り、測っている途中で気づいた点です。拡張に必須の変更ではありません(拡張はこれ無しでも動きます)。小さな改善として、方針に合えば取り入れていただけるとうれしいです。

問題

macOS 27 SDK(Xcode 27)でビルドすると、Foundation が ProgressReporter を足したため、LibraryStore の ProgressReporter と名前がぶつかって曖昧になり、ビルドが通りません。モジュール名で修飾しようにも、LibraryStore という名前の enum があるため LibraryStore.ProgressReporter がそちらに解決されてしまいます。

直したこと

  • LibraryStore に typealias LibraryProgressReporter = ProgressReporter を足し、ぶつかる所(書庫の作成・CLI の取り込みと進み具合の表示・その試験 2 つ)をこの名前で書きます。振る舞いは変わりません。

試験

  • Xcode 27(macOS 27 SDK)で swift build・swift test とアプリのビルド・試験が通ることを確かめました(main のままでは通りません)。Xcode 26 系の CI でも、名前の差し替えだけなので影響はないはずです。
  • 注: 手元の macOS 27 では、main でも PDFCoverExtractorTests の 1 件(0 ページの PDF を PDFKit で書き出す試験)が失敗します。この PR とは無関係で、OS の PDFKit の変化によるものとみています。

関連する PR

English summary

Found while building and measuring the qooViewer enhancements; not required by them. An optional small improvement; we would be glad if you could take it. The macOS 27 SDK adds Foundation.ProgressReporter, which clashes with LibraryStore.ProgressReporter, and module qualification resolves to the LibraryStore enum. A LibraryProgressReporter typealias is used at the clashing sites; no behaviour change.

🤖 Generated with Claude Code

- The macOS 27 SDK's Foundation declares its own ProgressReporter, so
  files importing both Foundation and LibraryStore no longer compile
  ("'ProgressReporter' is ambiguous for type lookup")
- Qualifying with the module name doesn't work because the module has an
  enum of the same name, so add the alias LibraryProgressReporter in
  LibraryStore and use it from AppCore, the import CLI and the tests
- The protocol itself is unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant