swift-syntax: [Swift 6.0] Xcode Beta 16 build failure

Description

‘retroactive’ attribute does not apply; ‘ExpressibleByStringInterpolation’ is declared in this module

#if compiler(>=6)
extension AccessorBlockSyntax: @retroactive ExpressibleByStringInterpolation {}
#endif
Captura de Tela 2024-09-08 às 13 48 26

Version 16.0 beta 6 (16A5230g)

Steps to Reproduce

Project dependencies: .package(url: “https://github.com/pointfreeco/swift-perception”, from: “1.3.5”), .package(url: “https://github.com/pointfreeco/swift-dependencies”, from: “1.3.9”), .package(url: “https://github.com/pointfreeco/swift-navigation”, from: “2.2.0”), .package(url: “https://github.com/airbnb/epoxy-ios”, branch: “master”),

Package.resolved:

{
 "originHash" : "b5cc99b627187e3e55bcd531e531927c1956cfe9585549e5df30af7445bf045f",
 "pins" : [
   {
     "identity" : "combine-schedulers",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/combine-schedulers",
     "state" : {
       "revision" : "9fa31f4403da54855f1e2aeaeff478f4f0e40b13",
       "version" : "1.0.2"
     }
   },
   {
     "identity" : "epoxy-ios",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/airbnb/epoxy-ios",
     "state" : {
       "branch" : "master",
       "revision" : "93178a5be0692261c34cbf2882ea1033a01d4f71"
     }
   },
   {
     "identity" : "swift-case-paths",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/swift-case-paths",
     "state" : {
       "revision" : "642e6aab8e03e5f992d9c83e38c5be98cfad5078",
       "version" : "1.5.5"
     }
   },
   {
     "identity" : "swift-clocks",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/swift-clocks",
     "state" : {
       "revision" : "b9b24b69e2adda099a1fa381cda1eeec272d5b53",
       "version" : "1.0.5"
     }
   },
   {
     "identity" : "swift-collections",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/apple/swift-collections",
     "state" : {
       "revision" : "9bf03ff58ce34478e66aaee630e491823326fd06",
       "version" : "1.1.3"
     }
   },
   {
     "identity" : "swift-concurrency-extras",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/swift-concurrency-extras",
     "state" : {
       "revision" : "bb5059bde9022d69ac516803f4f227d8ac967f71",
       "version" : "1.1.0"
     }
   },
   {
     "identity" : "swift-custom-dump",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/swift-custom-dump",
     "state" : {
       "revision" : "82645ec760917961cfa08c9c0c7104a57a0fa4b1",
       "version" : "1.3.3"
     }
   },
   {
     "identity" : "swift-dependencies",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/swift-dependencies",
     "state" : {
       "revision" : "3ef38bb702a1a2f39c7e19fc0578403b8ee52b17",
       "version" : "1.3.9"
     }
   },
   {
     "identity" : "swift-navigation",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/swift-navigation",
     "state" : {
       "revision" : "e834b3760731160d7d448509ee6a1408c8582a6b",
       "version" : "2.2.0"
     }
   },
   {
     "identity" : "swift-perception",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/swift-perception",
     "state" : {
       "revision" : "bc67aa8e461351c97282c2419153757a446ae1c9",
       "version" : "1.3.5"
     }
   },
   {
     "identity" : "swift-syntax",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/swiftlang/swift-syntax",
     "state" : {
       "revision" : "515f79b522918f83483068d99c68daeb5116342d",
       "version" : "600.0.0-prerelease-2024-09-04"
     }
   },
   {
     "identity" : "xctest-dynamic-overlay",
     "kind" : "remoteSourceControl",
     "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
     "state" : {
       "revision" : "96beb108a57f24c8476ae1f309239270772b2940",
       "version" : "1.2.5"
     }
   }
 ],
 "version" : 3
}

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you for the reduced example. It appears that there were two issues here:

  1. The error messages is confusing. It probably should say 'retroactive' attribute does not apply; 'AttributeListSyntax' is declared in this package instead of 'retroactive' attribute does not apply; 'ExpressibleByStringInterpolation' is declared in this module. I filed https://github.com/swiftlang/swift/issues/76724 to improve that.
  2. As you correctly analyzed, it looks like conformances within the same package domain are not considered retroactive. I opened https://github.com/swiftlang/swift-syntax/pull/2862 to allow swift-syntax to build with -package-name set and without.