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

Interface testing at compile time or runtime? #24

Open
gdalle opened this issue Oct 2, 2023 · 3 comments
Open

Interface testing at compile time or runtime? #24

gdalle opened this issue Oct 2, 2023 · 3 comments

Comments

@gdalle
Copy link
Collaborator

gdalle commented Oct 2, 2023

This is the central question that many other issues are debating.
At the moment, for performance reasons, testing is optional and can be done in the implementer package's test suite with Interfaces.test

Pull requests:

Issues:

@rafaqz
Copy link
Owner

rafaqz commented Oct 2, 2023

I think what was overlooked is that we can just accomodate both.

If you pass :untested or maybe :unproven to @implements then we wont run tests in precompile, and you have to run Interfaces.test manually.

Then we can define istested for a compile time check if packages want a strong guarantee of the interface.

On top of no precompile testing packages can also opt out of providing test objects to @implements, and they will need to provide them manually in test.

@gdalle
Copy link
Collaborator Author

gdalle commented Oct 2, 2023

That sounds good but we also need to keep in mind that each of these induces additional complexity in terms of both code and user experience

@rafaqz
Copy link
Owner

rafaqz commented Oct 2, 2023

Totally. Although we have half the code complexity already (because it was never deleted). I think this will only be about 10-20 lines added.

For the user experience I think the unproven option would not be widely advertised to minimise confusion, but available to those that look for it.

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

No branches or pull requests

2 participants