Hello,
We're interested in moving to swift-testing for our cross platform project, so we can take advantage of consistent tests across our Mac, Windows and Debian CI bots (via SPM). Im seeing conflicting info though on requirements to implement this. Are these still supported only via swift 6 nightlies? Or can they be run from the current swift 5.10 releases on Windows and Linux?
Thanks,
Mike
1 Like
smontgomery
(Stuart Montgomery)
June 17, 2024, 7:32pm
2
Hi @mikewoodworth , please see the documentation updates we landed in #466 as well as my Forum post from a couple months ago. Swift 6 development snapshot toolchains are required to build swift-testing now, and our intention is to release the first stable version in alignment with Swift 6.
If you've seen conflicting information, please let us know where, so we can try to correct that! It's possible we overlooked some places that need to be updated.
1 Like
vns
August 1, 2024, 3:17pm
3
I'm kinda confused to make it work on Linux (Ubuntu 22.04), currently getting
error: compile command failed due to signal 9 (use -v to see invocation)
error: fatalError
Swift version is installed via Swiftly as main-snapshot
(I have also tried 6.0-snapshot
, but it fails to find PackageDescription
for some reason):
Swift version 6.0-dev (LLVM 65ce91c9f45183f, Swift 4ce62af5a0b5e6b)
Target: x86_64-unknown-linux-gnu
The project I'm trying on is simple as possible:
Create new package with swift package init
Add swift-testing
as dependency from main
branch
Update initial test file to be
import Testing
@Suite
struct DemoTests {
@Test
func sample() {
#expect(true)
}
}
I assume it fails to compile SwiftSyntax for some reason, but can't understand what's wrong: toolchain? branch? else?
Have you tried passing -v
as suggested by the error message, to pinpoint the exact command invocation that crashed?
vns
August 1, 2024, 3:30pm
5
Yes, the latest command before the crash:
Looong invocation here
/home/contour/.local/share/swiftly/toolchains/main-snapshot-2024-07-31/usr/bin/swift-frontend -frontend -c /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/AbsolutePosition.swift /home/contour/check/.build/checkouts/swift-sy
ntax/Sources/SwiftSyntax/AbsoluteRawSyntax.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/AbsoluteSyntaxInfo.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Assert.swift /home/contour/chec
k/.build/checkouts/swift-syntax/Sources/SwiftSyntax/BumpPtrAllocator.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/CommonAncestor.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Convenien
ce.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/CustomTraits.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Identifier.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/Sw
iftSyntax/MemoryLayout.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/MissingNodeInitializers.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Raw/RawSyntax.swift /home/contour/check/.build
/checkouts/swift-syntax/Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Raw/RawSyntaxNodeProtocol.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax
/Raw/RawSyntaxTokenView.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SourceEdit.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SourceLength.swift /home/contour/check/.build/checkouts/sw
ift-syntax/Sources/SwiftSyntax/SourceLocation.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SourcePresence.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift /
home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Syntax.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxArena.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Synta
xArenaAllocatedBuffer.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxChildren.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxCollection.swift -primary-file /home
/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxHashable.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxIdentifier.swift -primary-file /home/contour/check/.build/checkouts/s
wift-syntax/Sources/SwiftSyntax/SyntaxNodeFactory.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxNodeStructure.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSy
ntax/SyntaxProtocol.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxText.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/SyntaxTreeViewMode.swift -primary-
file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/TokenDiagnostic.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/TokenSequence.swift -primary-file /home/contour/check/.build/che
ckouts/swift-syntax/Sources/SwiftSyntax/TokenSyntax.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Trivia.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/Utils.
swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/ChildNameForKeyPath.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/Keyword.swift -primary-fi
le /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/RenamedChildrenCompatibility.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/RenamedNodesCompatibility.swift -
primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift -primary-file
/home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxCollections.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxEnum.swift -primary-file /home/contour/c
heck/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxKind.swift -primary-file /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxRewriter.swift -primary-file /home/contour/check/.build/checkou
ts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxTraits.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/SyntaxVisitor.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/
TokenKind.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/Tokens.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/TriviaPieces.swift /home/contour/check/.build/checkouts/
swift-syntax/Sources/SwiftSyntax/generated/raw/RawSyntaxNodesAB.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/raw/RawSyntaxNodesC.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax
/generated/raw/RawSyntaxNodesD.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/raw/RawSyntaxNodesEF.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/raw/RawSyntaxNodesGHI
.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/raw/RawSyntaxNodesJKLMN.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/raw/RawSyntaxNodesOP.swift /home/contour/check/.
build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/raw/RawSyntaxNodesQRS.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/raw/RawSyntaxNodesTUVWXYZ.swift /home/contour/check/.build/checkouts/swift-syn
tax/Sources/SwiftSyntax/generated/raw/RawSyntaxValidation.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesAB.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax
/generated/syntaxNodes/SyntaxNodesC.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/syntaxNodes/
SyntaxNodesEF.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesGHI.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesJKLMN.swi
ft /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift /home/contour/check/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesQRS.swift /home/contour/che
ck/.build/checkouts/swift-syntax/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesTUVWXYZ.swift -supplementary-output-file-map /tmp/TemporaryDirectory.9xms8r/supplementaryOutputs-1 -target x86_64-unknown-linux-gnu -disable-objc-interop -I /h
ome/contour/check/.build/x86_64-unknown-linux-gnu/debug/Modules-tool -color-diagnostics -enable-testing -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/ModuleCache -suppre
ss-warnings -swift-version 6 -Onone -D SWIFT_PACKAGE -D DEBUG -empty-abi-descriptor -Xcc -working-directory -Xcc /home/contour/check -resource-dir /home/contour/.local/share/swiftly/toolchains/main-snapshot-2024-07-31/usr/lib/swift -enable-anony
mous-context-mangled-names -file-compilation-dir /home/contour/check -Xcc -fmodule-map-file=/home/contour/check/.build/checkouts/swift-syntax/Sources/_SwiftSyntaxCShims/include/module.modulemap -Xcc -I -Xcc /home/contour/check/.build/checkouts/s
wift-syntax/Sources/_SwiftSyntaxCShims/include -Xcc -fPIC -Xcc -g -Xcc -fno-omit-frame-pointer -module-name SwiftSyntax -in-process-plugin-server-path /home/contour/.local/share/swiftly/toolchains/main-snapshot-2024-07-31/usr/lib/swift/host/libS
wiftInProcPluginServer.so -plugin-path /home/contour/.local/share/swiftly/toolchains/main-snapshot-2024-07-31/usr/lib/swift/host/plugins -plugin-path /home/contour/.local/share/swiftly/toolchains/main-snapshot-2024-07-31/usr/local/lib/swift/host
/plugins -parse-as-library -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxCollection.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxHashable.swift.o -o
/home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxIdentifier.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxNodeFactory.swift.o -o /home/contour/check/.buil
d/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxNodeStructure.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxProtocol.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu
/debug/SwiftSyntax-tool.build/SyntaxText.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxTreeViewMode.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/T
okenDiagnostic.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/TokenSequence.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/TokenSyntax.swift.o -o /home/con
tour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/Trivia.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/Utils.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug
/SwiftSyntax-tool.build/ChildNameForKeyPath.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/Keyword.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/RenamedCh
ildrenCompatibility.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/RenamedNodesCompatibility.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxAnyVisito
r.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxBaseNodes.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxCollections.swift.o -o /home/contour/
check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxEnum.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxKind.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/d
ebug/SwiftSyntax-tool.build/SyntaxRewriter.swift.o -o /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/SwiftSyntax-tool.build/SyntaxTraits.swift.o -index-store-path /home/contour/check/.build/x86_64-unknown-linux-gnu/debug/index/store -
index-system-modules
No stack dump, no other errors in the whole output.
vns
August 1, 2024, 4:57pm
6
I've figured it out: memory issue. All the machines I have available have been using too few memory, so building just got stuck and killed eventually by the system. Adding swap has fixed build process. Thanks for jumping in anyway, it made me re-evaluate reasons again.
1 Like