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

Remove previously deprecated --enable-test-discovery #7391

Merged
merged 7 commits into from Mar 5, 2024

Conversation

MaxDesiatov
Copy link
Member

@MaxDesiatov MaxDesiatov commented Mar 4, 2024

This flag was deprecated for 4 years since Swift 5.4, Swift 6.0 is a good opportunity to remove it.

Closes #7389.

This flag was deprecated for 4 years since Swift 5.4, Swift 6.0 is a good opportunity to remove it.
@MaxDesiatov MaxDesiatov added the swift test Changes impacting `swift test` tool label Mar 4, 2024
@MaxDesiatov MaxDesiatov self-assigned this Mar 4, 2024
@MaxDesiatov
Copy link
Member Author

@swift-ci test

@MaxDesiatov
Copy link
Member Author

@swift-ci test

@MaxDesiatov
Copy link
Member Author

@swift-ci test windows

Copy link
Contributor

@grynspan grynspan left a comment

Choose a reason for hiding this comment

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

I've asked @stmontgomery to also review this change, but I'm glad to see this flag go.

I think there are some unit tests you'll also need to revise or delete while you're in here.

@MaxDesiatov
Copy link
Member Author

@swift-ci test

@MaxDesiatov
Copy link
Member Author

@swift-ci test windows

@MaxDesiatov
Copy link
Member Author

@swift-ci test

@MaxDesiatov
Copy link
Member Author

@swift-ci test windows

@MaxDesiatov
Copy link
Member Author

@swift-ci test

@MaxDesiatov
Copy link
Member Author

@swift-ci test windows

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) March 4, 2024 21:24
@MaxDesiatov
Copy link
Member Author

@swift-ci test windows

@MaxDesiatov
Copy link
Member Author

@yim-lee @ktoso I see a few repositories you worked on still have LinuxMain.swift. Especially if any of those had fatalError in them requiring users to pass --enable-test-discovery, it's best to delete those files at this point and use plain swift test when Swift 6.0 is released.

@ktoso
Copy link
Member

ktoso commented Mar 5, 2024

Sounds good, we only support swift 5.7+ nowadays in most telos so we can drop it I think.

Swift log I think supports ancient versions but we can maybe stop testing on them or something... I'll think about it

@yim-lee
Copy link
Member

yim-lee commented Mar 5, 2024

Thanks for the heads-up @MaxDesiatov.

I see a few repositories you worked on still have LinuxMain.swift.

Is LinuxMain.swift ignored in newer Swift versions?

Especially if any of those had fatalError in them requiring users to pass --enable-test-discovery

We have repos that pass --enable-test-discovery even in newer versions, but I don't think any of them does fatalError. Nevertheless, we will adjust the build params as needed once this change gets merged.

@ktoso I guess we should consider bumping up the Swift version requirement if we run into trouble removing --enable-test-discovery/LinuxMain.swift. At some point it doesn't make much sense to support ancient Swift versions.

@MaxDesiatov
Copy link
Member Author

Is LinuxMain.swift ignored in newer Swift versions?

It's only ignored when you pass --enable-test-discovery, and with this PR merged in Swift 6.0 that flag won't longer be available, we'll always use LinuxMain.swift or XCTMain.swift if those are present.

@yim-lee
Copy link
Member

yim-lee commented Mar 5, 2024

Got it. Thanks @MaxDesiatov.

@grynspan
Copy link
Contributor

grynspan commented Mar 5, 2024

we'll always use LinuxMain.swift or XCTMain.swift if those are present.

Don't we want to stop using it?

@MaxDesiatov
Copy link
Member Author

MaxDesiatov commented Mar 5, 2024

Don't we want to stop using it?

IDK, if we do we'd have to go through a deprecation cycle with those for at least a few releases first. This PR is about that one test discovery flag specifically.

@MaxDesiatov MaxDesiatov merged commit 259ec78 into main Mar 5, 2024
5 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/remove-test-discovery branch March 5, 2024 19:34
bnbarham added a commit that referenced this pull request Mar 5, 2024
DougGregor pushed a commit that referenced this pull request Mar 5, 2024
Reverts #7391, which blocks CI as various
projects are still using `--enable-test-discovery`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift test Changes impacting `swift test` tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

swift build --build-tests doesn't work with --enable-test-discovery flag
5 participants