Skip to content

Conversation

Copy link

Copilot AI commented Nov 17, 2025

The NonisolatedNonsendingByDefault feature flag causes type mismatches with Hummingbird's middleware protocol. This flag implicitly annotates closure parameters as nonisolated(nonsending), but Hummingbird v2.17.0's MiddlewareProtocol expects plain closure types.

Changes

  • Removed .enableUpcomingFeature("NonisolatedNonsendingByDefault") from Package.swift
  • Retained other Swift 6 upcoming features (ExistentialAny, InternalImportsByDefault, MemberImportVisibility, InferIsolatedConformances, ImmutableWeakCaptures)

Error Context

// Protocol definition in Hummingbird
func handle(_ input: Input, context: Context, next: (Input, Context) async throws -> Output) async throws -> Output

// With NonisolatedNonsendingByDefault enabled, implementations get implicit annotation
func handle(_ request: Request, context: Context, next: nonisolated(nonsending) (Request, Context) async throws -> Response) async throws -> Response
// ❌ Type mismatch

The feature can be re-enabled once Hummingbird adds support for it.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 17, 2025 04:50
Co-authored-by: zunda-pixel <47569369+zunda-pixel@users.noreply.github.com>
Co-authored-by: zunda-pixel <47569369+zunda-pixel@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 17, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • ocsp.apple.com
    • Triggering command: /usr/share/swift/usr/bin/swift-build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix CI error in NonisolatedNonsending feature Remove NonisolatedNonsendingByDefault feature flag due to Hummingbird incompatibility Nov 17, 2025
Copilot finished work on behalf of zunda-pixel November 17, 2025 05:04
Copilot AI requested a review from zunda-pixel November 17, 2025 05:04
@zunda-pixel
Copy link
Owner

@copilot
NonisolatedNonsendingByDefaultを削除せずに対応する場合、Swift OpenAPI Hummingbirdを修正する必要がありますか?

Copy link
Author

Copilot AI commented Nov 17, 2025

@copilot
NonisolatedNonsendingByDefaultを削除せずに対応する場合、Swift OpenAPI Hummingbirdを修正する必要がありますか?

いいえ、修正が必要なのは Hummingbird です。Swift OpenAPI Hummingbirdではありません。

エラーが発生していたのは、このプロジェクトで定義されている3つのミドルウェア(OpenAPIRequestContextMiddlewareRateLimitMiddlewareUserTokenMiddleware)が、Hummingbirdの RouterMiddleware プロトコルに準拠しているためです。

NonisolatedNonsendingByDefault を削除せずに対応する場合、Hummingbird本体(現在v2.17.0)がこの機能フラグをサポートする必要があります。Hummingbirdのリポジトリに機能リクエストを出すか、PRを送ることで対応できます。

ただし、Swift OpenAPI Hummingbirdを含む他の依存関係も同じ問題を抱えている可能性があるため、エコシステム全体が対応するまで待つ必要があるかもしれません。

Copilot finished work on behalf of zunda-pixel November 17, 2025 05:15
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.

2 participants