-
Notifications
You must be signed in to change notification settings - Fork 237
Description
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.
- Ideally, Remove the unsafe flags check swift-package-manager#8876 completely.
Expected behavior
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