-
Notifications
You must be signed in to change notification settings - Fork 230
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
Skip tests when missing language interpreters, rather than failing them. #466
Comments
It doesn't seem to be possible to dynamically decide to skip a test in Rust (e.g. you can't do a
Luckily for us, all the foreign-language tests are auto-generated via the One nice thing about this approach is that in CI, we could run the tests with |
Concretely, we'd have to expose a new function for each language backend like Then, we'd have to move some of the logic for figuring out which language backend corresponds to which test file out of the run-time code in We'd also want a simple in-memory cache of the results of calling |
Even in that scenario, a simple check that Another simpler option (albeit with worse developer ergonomics) is to have some kind of opt-out scenario. If the error messages noted how to opt-out, it might be a reasonable option. |
Right; in practice I think it would have to actually try to execute a tiny sample program in order to tell whether running the tests would succeed.
I also wonder if splitting the language backends into their own crates (ref #299 (comment)) would help with this. Then if you don't want to run e.g. the Kotlin tests, you don't |
I think we can declare this as fixed by #1031 - it uses an env-var instead of automatically trying to determine if working bindings exist, but does |
As suggested in #464 (review), it's a little hostile to expect that everyone working on UniFFI will have all of the supporting software for all supported languages installed on their development machine in order to run
cargo test
. That's what we have CI for!Instead of throwing an error when e.g. the Ruby interpreter or the Swift compiler is not available, can we do something similar to "skip test" so that it doesn't fail local builds? (And then in CI, require that no tests be skipped?).
┆Issue is synchronized with this Jira Task
┆Issue Number: UNIFFI-61
The text was updated successfully, but these errors were encountered: