Skip to content

[Source compatibility suite] multiple projects failing to build - cannot infer contextual base in reference to member 'lock' #79704

@justice-adams-apple

Description

@justice-adams-apple

Description

Multiple source compatibility projects are failing to build with the following error after the SDK update to Xcode 16.2 Build version 16C5031c:

swift-nio/Sources/NIOCore/AsyncSequences/NIOAsyncWriter.swift:545:24: error: cannot infer contextual base in reference to member 'lock'
 543 |                 // We are manually locking here to hold the lock across the withCheckedContinuation call
 544 |                 let unsafe = self._state.unsafe
 545 |                 unsafe.lock()
     |                        `- error: cannot infer contextual base in reference to member 'lock'
 546 | 
 547 |                 let action = unsafe.withValueAssumingLockIsAcquired {

The following projects are failing:

  • async-http-client
  • fluent
  • grpc
  • hummingbird
  • mqtt-nio
  • Smtp
  • swift-cluster-membership
  • swift-distributed-actors
  • swift-nio-extras
  • swift-nio-http2
  • swift-nio-ssh
  • swift-nio-ssl
  • swift-nio-transport-services
  • vapor_apns
  • vapor_async-kit
  • vapor_fluent-kit
  • vapor_fluent-mysql-drive
  • vapor_fluent-postgres-driver
  • vapor_fluent-sqlite-driver
  • vapor_jwt
  • vapor_leaf
  • vapor_leaf
  • vapor_leaf-kit
  • vapor_multipart-kit
  • vapor_mysql-kit
  • vapor_mysql-nio
  • vapor_postgres-kit
  • vapor_postgres-nio
  • vapor_queues
  • vapor_queues-redis-driver
  • vapor_redis
  • vapor_sqlite-kit
  • vapor_sqlite-nio
  • vapor_template-bare
  • vapor_template-fluent-postgres-leaf
  • vapor_vapor

https://ci.swift.org/job/swift-main-source-compat-suite-debug/1046/artifact/swift-source-compat-suite/

Reproduction

$ swift build --disable-sandbox --package-path async-http-client --verbose --configuration debug --build-tests -Xswiftc -swift-version -Xswiftc 5 -Xswiftc -enable-testing

Expected behavior

Expected projects to build correctly

Environment

Apple Swift version 6.2-dev (LLVM 6e0f052df8282a3, Swift fcc367a)
Target: x86_64-apple-macosx10.13

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrontendArea → compiler: FrontendbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfsource compatibilitysource compatibility suiteFlag: An issue that surfaced in the source compatibility suiteswift 6.2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions