You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.
As a big fan of python doctests I actually had a proof of concept swift doctest working a few years ago. I didn’t get much beyond proof of concept (although I do have some doctest comments still sprinkled in my codebase). One difference between your doctest and mine was that my version didn’t try to run the tests - it would merely codegen XCTest files that you could include and run as part of your normal unit test phase.
I definitely see the advantage of doctest being used to run the tests - but using it for codegen-ing removes some of burden of installing another tool, integrates well with other testing tools/CI etc and allows users to migrate away from doctest if it for whatever reason it doesn’t work out for them.
Just a suggestion of course.
The text was updated successfully, but these errors were encountered:
I agree that this would be a useful feature. I'd say the story for code generation in Swift is only "so-so" right now. Template-based systems like Sourcery have their uses, but I don't think it'd be a great fit here. I think SwiftSyntaxBuilder is really promising, and I hope that gets some more attention soon.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As a big fan of python doctests I actually had a proof of concept swift doctest working a few years ago. I didn’t get much beyond proof of concept (although I do have some doctest comments still sprinkled in my codebase). One difference between your doctest and mine was that my version didn’t try to run the tests - it would merely codegen XCTest files that you could include and run as part of your normal unit test phase.
I definitely see the advantage of doctest being used to run the tests - but using it for codegen-ing removes some of burden of installing another tool, integrates well with other testing tools/CI etc and allows users to migrate away from doctest if it for whatever reason it doesn’t work out for them.
Just a suggestion of course.
The text was updated successfully, but these errors were encountered: