duchess-rs / duchess

Silky smooth Java-Rust interop
https://duchess-rs.github.io/duchess/
Apache License 2.0
138 stars 17 forks source link

Improve the java-to-rust test integration with ui_test #172

Open bowemi opened 1 month ago

bowemi commented 1 month ago

Right now if you annotate a java-to-rust test with //@check-pass it also runs and if you annotate with //@run, it errors

Currently build.rs compiles all java code with javac then the java-to-rust tests are run with java via the java_wrapper

By having the java compilation separate from the java run, ui_test features that expect compilation success or failure don't work as expected.

oli-obk commented 1 month ago

I'm releasing a new ui test version this week. We can then write a custom //@run flag to handle this correctly

bowemi commented 1 month ago

Another option is to update java_wrapper to take in additional parameters as well as run javac + java. Then java_wrapper could use the file annotations to determine whether javac + java is used or just javac

https://github.com/duchess-rs/duchess/blob/main/test-crates/duchess-java-tests/tests/ui.rs#L131