You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Right now, swiftlang/swift-markdown has introduced an unsafe flag for the Windows platform.
I'm trying to build my package that depends on swift-format (which depends on swift-markdown) on macOS/Linux platforms, but neither swift build nor swift test succeeds.
I'm getting an error: 'swift-format': the target 'Markdown' in product 'Markdown' contains unsafe build flags on the macOS platform.
But unsafe flag is only for windows platform.
Linking a corresponding issue in swift-markdown: #239 .
I see three options for fixing this issue:
At least allow linking with dependencies that don't have unsafe flags for the current platform.
Have a flag to turn off the unsafe flags check. For folks who know what they are doing.
The swift test, swift build commands do the job and don't fail.
Actual behavior
An error: 'swift-format': the target 'Markdown' in product 'Markdown' contains unsafe build flags is thrown.
Package doesn't compile.
Steps to reproduce
Create a package that depends on the swift-markdown 0.7.0.
Build it on macOS/Linux platform.
You've got an error.
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version ; uname -a)
swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
Target: arm64-apple-macosx26.0
Darwin hapuku-QM17NWPXNV-DS 25.0.0 Darwin Kernel Version 25.0.0: Mon Aug 25 21:17:51 PDT 2025; root:xnu-12377.1.9~3/RELEASE_ARM64_T6020 arm64
Is it reproducible with SwiftPM command-line tools:
swift build,swift test,swift packageetc?swift build,swift test,swift packageetc.Description
Right now, swiftlang/swift-markdown has introduced an unsafe flag for the Windows platform.
I'm trying to build my package that depends on
swift-format(which depends onswift-markdown) on macOS/Linux platforms, but neitherswift buildnorswift testsucceeds.I'm getting an
error: 'swift-format': the target 'Markdown' in product 'Markdown' contains unsafe build flagson the macOS platform.But unsafe flag is only for windows platform.
Linking a corresponding issue in swift-markdown: #239 .
I see three options for fixing this issue:
Expected behavior
The
swift test,swift buildcommands do the job and don't fail.Actual behavior
error: 'swift-format': the target 'Markdown' in product 'Markdown' contains unsafe build flagsis thrown.Steps to reproduce
0.7.0.Swift Package Manager version/commit hash
No response
Swift & OS version (output of
swift --version ; uname -a)swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
Target: arm64-apple-macosx26.0
Darwin hapuku-QM17NWPXNV-DS 25.0.0 Darwin Kernel Version 25.0.0: Mon Aug 25 21:17:51 PDT 2025; root:xnu-12377.1.9~3/RELEASE_ARM64_T6020 arm64