Skip to content

Enable Memory Layout Tests in Release build #2175

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

Merged

Conversation

mininny
Copy link
Contributor

@mininny mininny commented Sep 10, 2023

Remove #if DEBUG checks for MemoryLayoutTests and SyntaxMemoryLayout.

Building and testing it on my local machine with RELEASE config passed without any changes.

Resolves #2170

@mininny mininny requested a review from ahoppen as a code owner September 10, 2023 11:12
Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this, @mininny!

Disclaimer: I'm not a maintainer, so my approval doesn't necessarily mean much. @ahoppen, please do tell me not post approvals if they're confusing. I'm just learning, so I pulled this to read through it and run locally.

swift test

  • 15 failures, 0 unexpected
  • Failed tests in LinkageTests.
  • That should not be related to this PR. I'm hitting the same 15 failures on main.
Test Suite 'LinkageTest' started at 2023-09-10 13:32:11.591.
Test Case '-[SwiftParserTest.LinkageTest testLinkage]' started.
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:79: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to library("-lswiftSwiftOnoneSupport"), but recieved linkage to -lswiftObservation; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:80: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to library("-lswiftXPC"), but recieved linkage to -lswiftSwiftOnoneSupport; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:81: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to library("-lswift_Concurrency"), but recieved linkage to -lswiftXPC; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:83: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to library("-lswiftos"), but recieved linkage to -lswift_Concurrency; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:84: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("CFNetwork"), but recieved linkage to -lswift_StringProcessing; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:85: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("Combine"), but recieved linkage to -lswiftos; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:86: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("CoreFoundation"), but recieved linkage to CFNetwork; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:87: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("CoreServices"), but recieved linkage to Combine; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:88: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("DiskArbitration"), but recieved linkage to CoreFoundation; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:89: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("Foundation"), but recieved linkage to CoreServices; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:90: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("IOKit"), but recieved linkage to DiskArbitration; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:91: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("OSLog"), but recieved linkage to Foundation; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:92: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Expected linkage to framework("Security"), but recieved linkage to IOKit; Perhaps linkage assertions are out of order?
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:62: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Found unasserted link-time dependency: OSLog
/Users/nategadzhi/src/apple/swift-syntax/Tests/SwiftParserTest/LinkageTests.swift:62: error: -[SwiftParserTest.LinkageTest testLinkage] : failed - Found unasserted link-time dependency: Security
Test Case '-[SwiftParserTest.LinkageTest testLinkage]' failed (0.417 seconds).
Test Suite 'LinkageTest' failed at 2023-09-10 13:32:12.008.
	 Executed 1 test, with 15 failures (0 unexpected) in 0.417 (0.417) seconds

swift test -c release

  • 14 failures, 0 unexpected, same file.

Testing just the MemoryLayoutTest with release configuration passes locally, too. Xcode 15 beta 7 toolchain.

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nice. This was easy

@ahoppen
Copy link
Member

ahoppen commented Sep 11, 2023

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge September 11, 2023 16:44
@ahoppen
Copy link
Member

ahoppen commented Sep 11, 2023

Disclaimer: I'm not a maintainer, so my approval doesn't necessarily mean much. @ahoppen, please do tell me not post approvals if they're confusing. I'm just learning, so I pulled this to read through it and run locally.

Please feel free to review PRs if you’re comfortable with that. You’ve got enough experience in the repo already to provide valuable feedback.

@ahoppen
Copy link
Member

ahoppen commented Sep 11, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 754ec0b into swiftlang:main Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable MemoryLayoutTest in CI/release builds
3 participants