-
Notifications
You must be signed in to change notification settings - Fork 240
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
Adding support for external fixture/example tests #1206
Conversation
4453fb0
to
d6e92d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM and I think I understand the justification, but it only makes sense in a world where #1150 is approved, right?
@@ -1,6 +1,6 @@ | |||
[package] | |||
# TODO: modify the crate name to test non-default names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be inclined to delete this comment while you are here - I've no idea what it means, and I suspect I added it :)
@@ -0,0 +1,11 @@ | |||
[package] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this crate should have a README.md
Since #1201 was merged, I figured that we were going forward with this, at least in the limited sense of supporting external bindings. I'll try to update this based on the other comments. |
d6e92d3
to
d3e50db
Compare
Yeah I think the scope of #1150 should be smaller and landed at this point, I'll cut it down so it only represents the work in #1201 and this PR - keeping the rest of the bindings and details around version management to separate ADRs |
d3e50db
to
a3bd07c
Compare
Added code to allow external bindings crates to find the UDL files and cdylibs for examples/fixtures. Made a new crate for this, since I didn't want to pull in `serde` as a dependency for `uniffi`. Eventually, this can replace `uniffi/testing.rs` and we can remove some other dependencies from `uniffi` like `cargo_metadata`. Standardized the crate names for fixtures/examples. I think we're going to need to publish these to crates.io eventually. Make all fixtures/examples specify `crate-type = ["lib", "cdylib"]`. The `lib` part is needed for moz-central to be able to import these crates and build them into `libxul`. Added `Cargo.toml` config section that lists external clates for `ext-types` We copy the dylibs for external crates as well as our own. I think this should fix mozilla#1183.
a3bd07c
to
a998673
Compare
Added code to allow external bindings crates to find the UDL files and cdylibs for examples/fixtures. Made a new crate for this, since I didn't want to pull in
serde
as a dependency foruniffi
. Eventually, this can replaceuniffi/testing.rs
and we can remove some other dependencies fromuniffi
likecargo_metadata
.This commit adds a testing framework that works with external bindings, but we're not actually using it yet. The plan is to use is for the desktop JS bindings, whose code will live in moz-central.
For an example of how this code would be use, take a look at #1205. It moves the existing bindings to separate crates and switches them to using this testing framework.