Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiftbuild system doesn't support the build --enable-parseable-module-interfaces flag #8337

Open
1 task done
cmcgee1024 opened this issue Mar 7, 2025 · 2 comments
Open
1 task done
Labels
bug swift build Changes impacting `swift build`

Comments

@cmcgee1024
Copy link
Member

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

This flag triggers the native build system to produce .swiftinterface files. However, it doesn't do that with the swiftbuild build system.

Expected behavior

It is expected that the swiftbuild build system should be able to support this flag and produce the parsable interface files like the native build system.

Actual behavior

The build doesn't produce any interface files. See the test case for the details of the expected interface files.

Steps to reproduce

To reproduce on macOS with #8333

  1. Edit Tests/CommandsTests/BuildCommandTests.swift to comment out the skipping of a test ~ line 859
  2. Run the following test
swift test --filter=BuildCommandSwiftBuildTests.testParseableInterfaces
  1. Ensure that the test is not being skipped

Swift Package Manager version/commit hash

main

Swift & OS version (output of swift --version ; uname -a)

Apple Swift version 6.0.3 (swift-6.0.3-RELEASE)
Target: arm64-apple-macosx15.0

@cmcgee1024 cmcgee1024 added the bug label Mar 7, 2025
@cmcgee1024
Copy link
Member Author

There is a build setting called BUILD_FOR_DISTRIBUTION that should enable this capability with swift-build.

@cmcgee1024
Copy link
Member Author

Note that a very similar situation happens when a Package.swift has set -enable-library-evolution as an unsafe flag. It could be a similar root cause.

@plemarquand plemarquand added the swift build Changes impacting `swift build` label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug swift build Changes impacting `swift build`
Projects
None yet
Development

No branches or pull requests

2 participants