Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12500] Assertion failure when running tests with Swift 5.2 on Linux #4569

Closed
jpsim opened this issue Apr 4, 2020 · 6 comments
Closed

[SR-12500] Assertion failure when running tests with Swift 5.2 on Linux #4569

jpsim opened this issue Apr 4, 2020 · 6 comments
Labels

Comments

@jpsim
Copy link
Contributor

@jpsim jpsim commented Apr 4, 2020

Previous ID SR-12500
Radar rdar://problem/62201594
Original Reporter @jpsim
Type Bug
Status Resolved
Resolution Done
Environment

Swift 5.2 docker

Additional Detail from JIRA
Votes 0
Component/s Package Manager, SwiftSyntax
Labels Bug
Assignee None
Priority Medium

md5: 3d42263bf0e2f6a07938e733b44d5887

Issue Description:

$ git clone https://github.com/realm/SwiftLint.git
$ cd SwiftLint
$ git checkout da3e1a793baf5c408ecec5022b79056f00f2be63
$ docker run -v `pwd`:`pwd` -w `pwd` --name swiftlint --rm swift:5.2 swift test --parallel
Test Suite 'Selected tests' started at 2020-04-03 23:36:55.618
Test Suite 'DeploymentTargetRuleTests' started at 2020-04-03 23:36:55.621
Test Case 'DeploymentTargetRuleTests.testMacOSAttributeReason' started at 2020-04-03 23:36:55.621
SwiftLintPackageTests.xctest: /home/buildnode/jenkins/workspace/oss-swift-5.2-package-linux-ubuntu-18_04/swift/lib/IDE/SyntaxModel.cpp:1196: bool (anonymous namespace)::ModelASTWalker::handleSpecialDeclAttribute(const swift::DeclAttribute *, ArrayRef<swift::Token>): Assertion `0 && "Attribute's TokenNodes already consumed?"' failed.
Stack dump:
0.  While walking into decl 'A' (at 8004087135770073511:2:1)
Exited with signal code 6
@beccadax
Copy link
Contributor

@beccadax beccadax commented Apr 17, 2020

@swift-ci create

@rintaro
Copy link
Mannequin

@rintaro rintaro mannequin commented Apr 29, 2020

This should be fixed in apple/swift#29769
@jpsim Could you try the latest trunk snapshot?

@jpsim
Copy link
Contributor Author

@jpsim jpsim commented Apr 30, 2020

This is still happening with swift-DEVELOPMENT-SNAPSHOT-2020-04-28-a

$ git clone https://github.com/realm/SwiftLint.git
$ cd SwiftLint
$ git checkout da3e1a793baf5c408ecec5022b79056f00f2be63
$ docker run -v `pwd`:`pwd` -w `pwd` --name swiftlint --rm norionomura/swift:20200428a swift test --parallel
Test Case 'DeploymentTargetRuleTests.testMacOSAttributeReason' started at 2020-04-30 04:19:13.780
SwiftLintPackageTests.xctest: /home/buildnode/jenkins/workspace/oss-swift-package-linux-ubuntu-16_04/swift/lib/IDE/SyntaxModel.cpp:1217: bool (anonymous namespace)::ModelASTWalker::handleSpecialDeclAttribute(const swift::DeclAttribute *, ArrayRef<swift::Token>): Assertion `0 && "Attribute's TokenNodes already consumed?"' failed.
Stack dump:
0.  While walking into decl 'A' (at 8004087135770073511:2:1)
Exited with signal code 6
$ docker run --rm norionomura/swift:20200428a swift --version
Swift version 5.3-dev (LLVM 8c951cb804, Swift 3b746bed37)
Target: x86_64-unknown-linux-gnu

@nathawes
Copy link
Contributor

@nathawes nathawes commented May 6, 2020

Fixed this in apple/swift#31465

@jpsim I think you should be able to use '@available' rather than '@Availability' in the test that's hitting this to work around it (if that's not important to the test in some way).

@jpsim
Copy link
Contributor Author

@jpsim jpsim commented May 6, 2020

Thanks, I've confirmed that this is fixed in the 20200505a snapshot.

Was @availability renamed to @available in Swift 5.3? I wasn't aware of that change.

@nathawes
Copy link
Contributor

@nathawes nathawes commented May 6, 2020

Looks like it changed quite a while ago by the commit history: apple/swift@bf402b3

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants