-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
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 packageetc.
Description
When attempting to build a package that has a dependency with warnings as errors turned on when using the new build system, the package fails to compile with error: conflicting options '-warnings-as-errors' and '-suppress-warnings'.
There is a feedback for this behaviour in Xcode at FB21347321
Expected behavior
It compiles
Actual behavior
It fails to compile with
➜ WarningsAsErrors git:(main) ✗ swift build --build-system swiftbuild
Building for debugging...
Build description signature: 188e5c58d74db20dcaa8004f034ca1c2
Build description path: /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/XCBuildData/188e5c58d74db20dcaa8004f034ca1c2.xcbuilddata
-fmodules -gmodules '-fmodules-cache-path=/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/ModuleCache.noindex' '-fmodule-name=CVaporAuthBcrypt' -fpascal-strings -O0 -DSWIFT_PACKAGE '-DDEBUG=1' -DENABLE_C_BOUNDS_SAFETY -g -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Products/Debug/include -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/checkouts/authentication/Sources/CVaporAuthBcrypt/include -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/CVaporAuthBcrypt.build/DerivedSources-normal/arm64 -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/CVaporAuthBcrypt.build/DerivedSources/arm64 -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/CVaporAuthBcrypt.build/DerivedSources -F/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Products/Debug -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -DXcode -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks -fPIC -g
[76/100] Crypto 111 / 140error: conflicting options '-warnings-as-errors' and '-suppress-warnings'
error: conflicting options '-warnings-as-errors' and '-suppress-warnings'
error: SwiftDriver Authentication normal arm64 com.apple.xcode.tools.swift.compiler failed with a nonzero exit code. Command line: cd /Users/timc/Developer/tmp
builtin-SwiftDriver -- /Users/timc/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-15-a.xctoolchain/usr/bin/swiftc -parse-as-library -module-name Authentication -Onone -enforce-exclusivity\=checked @/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/Objects-normal/arm64/Authentication.SwiftFileList -DSWIFT_PACKAGE -DDEBUG -DSWIFT_MODULE_RESOURCE_BUNDLE_UNAVAILABLE -Xcc -fmodule-map-file\=/Users/timc/Developer/tmp/WarningsAsErrors/.build/checkouts/authentication/Sources/CVaporAuthBcrypt/include/module.modulemap -DXcode -enable-experimental-feature SuppressedAssociatedTypes -enable-experimental-feature LifetimeDependence -enable-upcoming-feature LifetimeDependence -enable-upcoming-feature NonisolatedNonsendingByDefault -enable-upcoming-feature InferIsolatedConformances -enable-upcoming-feature ExistentialAny -enable-upcoming-feature MemberImportVisibility -enable-upcoming-feature InternalImportsByDefault -warnings-as-errors -strict-memory-safety -enable-experimental-feature SafeInteropWrappers -Xcc -fexperimental-bounds-safety-attributes -I /Users/timc/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-15-a.xctoolchain/usr/lib/swift/macosx/testing -L /Users/timc/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-15-a.xctoolchain/usr/lib/swift/macosx/testing -plugin-path /Users/timc/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2025-12-15-a.xctoolchain/usr/lib/swift/host/plugins/testing -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -g -plugin-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing -enable-experimental-feature DebugDescriptionMacro -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk -target arm64-apple-macos26.0 -g -module-cache-path /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/ModuleCache.noindex -Xfrontend -serialize-debugging-options -enable-testing -suppress-warnings -index-store-path /Users/timc/Developer/tmp/WarningsAsErrors/.build/out -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -swift-version 6 -I /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Products/Debug -Isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Products/Debug/PackageFrameworks -F /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Products/Debug/PackageFrameworks -F /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Products/Debug -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -c -j16 -enable-batch-mode -incremental -output-file-map /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/Objects-normal/arm64/Authentication-OutputFileMap.json -use-frontend-parseable-output -save-temps -no-color-diagnostics -explicit-module-build -module-cache-path /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/SwiftExplicitPrecompiledModules -clang-scanner-module-cache-path /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/ModuleCache.noindex -sdk-module-cache-path /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/ModuleCache.noindex -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/Objects-normal/arm64/Authentication.swiftmodule -validate-clang-modules-once -clang-build-session-file /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/ModuleCache.noindex/Session.modulevalidation -package-name authentication -Xcc -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/swift-overrides.hmap -emit-const-values -Xfrontend -const-gather-protocols-file -Xfrontend /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/Objects-normal/arm64/Authentication_const_extract_protocols.json -Xcc -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/checkouts/authentication/Sources/CVaporAuthBcrypt/include -Xcc -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Products/Debug/include -Xcc -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/DerivedSources-normal/arm64 -Xcc -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/DerivedSources/arm64 -Xcc -I/Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -emit-objc-header -emit-objc-header-path /Users/timc/Developer/tmp/WarningsAsErrors/.build/out/Intermediates.noindex/authentication.build/Debug/Authentication.build/Objects-normal/arm64/Authentication-Swift.h -working-directory /Users/timc/Developer/tmp -experimental-emit-module-separately -disable-cmo
error: Build failed
Steps to reproduce
git clone https://github.com/0xTim/WarningsAsErrorscd WarningsAsErrorsswift build --build-system swiftbuild
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version ; uname -a)
Apple Swift version 6.3-dev (LLVM 36e07716208ae15, Swift 7b214378007870f)
Target: arm64-apple-macosx26.0
Build config: +assertions
Darwin Tims-MacBook-Pro-2024.local 25.2.0 Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:56 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6041 arm64