-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add swift-testing dependency #153
Comments
Here is something blocking items preventing the adoption in Swift-DocC project IMO:
|
Hi Kyle! swift-testing has a permanent dependency on Swift 5.9 due to its use of macros. It does not have a declared dependency on swift-docc-plugin. |
I'll update the statements. I checked it again and found my mistake here. |
Please file an issue against SwiftPM for this? |
Got it. Filed via swiftlang/swift-package-manager#7007 |
I agree with those items. |
Have tried swift-testing for a while. I think it's ready for production use. (Won't make it default or rewrite all test case into it before Swift 6.) Add a PR to draft the integration. See #175
|
That said I still hope #135 can be merged since we have discussed and approved it on SDWG meeting. :) |
This package remains experimental. We do not consider it ready for production use at this time. |
Of course. It won't be production ready before 1.0 release. Sorry for the incorrect wording. I mean we can consider making it for experiential usage under a feature flag. |
I don't think we should have experimental dependencies. It's better to wait until swift-testing is considered ready for production. |
i encourage swift-markdown (and other packages) to adopt swift-testing. my experience at our organization is that not doing so disincentivizes developers from writing tests, as all tests written against a legacy framework would need to be rewritten later. since we are constantly expecting swift-testing 1.0 to be “just around the corner”, the quality of code can deteriorate markedly as test writing gets repeatedly deferred. |
As swift-testing is bundled with Xcode 16 beta now and will probably be release together with Xcode 16, can we revisit this policy? @d-ronnqvist Also would you mind helping to explain the current situation of swift-testing in swift-toolchain? It is not clear to me whether swift-testing will be available in the next Swift 6 toolchain for non-Darwin platform(Linux & Windows)? @grynspan |
I may be wrong about this but my understanding is that this would require a Swift 6 toolchain (Xcode 16) for building on all platforms. If that is correct, we shouldn't adopt Swift Testing yet. We still want to be able to build Swift Markdown, Swift SymbolKit, Swift DocC, etc. with a Swift 5.9 toolchain on all platforms. |
We can have both IMO. Since swift-markdown is toolchain package, and the main branch corresponds to swift/6.0 or swift/next toolchain. I do not understand why we need to maintain older Swift development environment. Of course we will continue to support older SDK build and old runtime running via [email protected] or something else. eg. But bumping the development environment to Swift 6 seems no harm to me. |
Swift Testing will only be supported with a Swift 6 toolchain or newer. At this time, it has not been added to prerelease the Swift 6 toolchain. |
I guess we can use
Is there any other thing we need to configure as swift-markdown is part of the Swift Toolchain? eg. Explicitly declare a dependency relation between swift-markdown on swift-testing on https://github.com/swiftlang/swift |
That should "just work". |
Sometimes the XCTAssert's output for diff is not very clear.
(For example I have to copy paste a few times from the result of
Swift.print
or the failure result ofXCTAssertEqual
to make it happy)I can certainly solve it in the end. But if we can migrate to use swift-testing as our test framework, it will be more clear and more efficient.
The text was updated successfully, but these errors were encountered: