swift
swift copied to clipboard
Building `stdlib/public/Backtracing/Backtrace.swift` fails
Description
Command:
utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs="$(uname -m)" --release-debuginfo --sccache --swift-disable-dead-stripping --skip-early-swift-driver --bootstrapping=off
Error:
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:479:21: error: expected a macro identifier for a pound literal expression
let mapRegex = #/
^
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:479:21: error: consecutive statements on a line must be separated by ';'
let mapRegex = #/
^
;
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:479:21: error: operator with postfix spacing cannot start a subexpression
let mapRegex = #/
^
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:480:49: error: consecutive statements on a line must be separated by ';'
^(?<start>[A-Fa-f0-9]+)-(?<end>[A-Fa-f0-9]+)\s+
^
;
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:481:22: error: expected ',' separator
(?<perms>[-rwxsp]{4})\s+
^
,
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:481:26: error: consecutive statements on a line must be separated by ';'
(?<perms>[-rwxsp]{4})\s+
^
;
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:482:28: error: consecutive statements on a line must be separated by ';'
(?<offset>[A-Fa-f0-9]+)\s+
^
;
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:483:27: error: consecutive statements on a line must be separated by ';'
(?<major>[A-Fa-f0-9]+):(?<minor>[A-Fa-f0-9]+)\s+
^
;
/Users/mac/Desktop/swift-project/swift/stdlib/public/Backtracing/Backtrace.swift:483:27: error: expected expression
(?<major>[A-Fa-f0-9]+):(?<minor>[A-Fa-f0-9]+)\s+
^
Environment
- Swift version 5.9-dev (LLVM d638e0929fa87b0, Swift 23e2f345b51ca0c)
It seems like --bootstrapping=off is no longer a valid option (or it should cause building of the Backtracing module to be skipped if possible).
@al45tair is working on a fix for this. The Backtracing module doesn't technically need to use a regex here.
That's in #66449, FWIW. I hadn't appreciated when I wrote that code that it would cause this problem, but it's easy to fix.
Should be fixed on main. I'll cherry pick the fix to 5.9 as well.
Cherry pick to 5.9 is #66485.