Skip to content

Getting warnings about @_implementationOnly when building a package dependent on SwiftSyntax #2228

Closed
@grynspan

Description

@grynspan

Description

When building swift-testing, I get a bunch of warnings along these lines while SwiftSyntax builds:

/Volumes/Dev/Source/swift-testing/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxText.swift:15:22: warning: using '@_implementationOnly' without enabling library evolution for 'SwiftSyntax' may lead to instability during execution
@_implementationOnly import Darwin
                     ^
/Volumes/Dev/Source/swift-testing/.build/checkouts/swift-syntax/Sources/SwiftCompilerPlugin/CompilerPlugin.swift:16:22: warning: using '@_implementationOnly' without enabling library evolution for 'SwiftCompilerPlugin' may lead to instability during execution
@_implementationOnly import SwiftCompilerPluginMessageHandling
                     ^

This then pollutes the output of the downstream package (swift-testing) that's using SwiftSyntax. :(

Steps to Reproduce

Using toolchain swift-DEVELOPMENT-SNAPSHOT-2023-09-20-a and SwiftSyntax 509.0.0.

To repro:

  1. Check out https://github.com/apple/swift-testing
  2. export TOOLCHAINS=swift (if needed)
  3. swift test

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions