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

Changes for v0.28.1 #2213

Merged
merged 70 commits into from
Aug 13, 2024
Merged

Changes for v0.28.1 #2213

merged 70 commits into from
Aug 13, 2024

Conversation

bendk
Copy link
Contributor

@bendk bendk commented Aug 9, 2024

I'm hoping to make a 0.28.1 release from the latest main. There's a lot of commits here, but no breaking changes. In fact, most of the commits are documentation related or refactorings that don't change any behavior.

mgeisler and others added 30 commits June 24, 2024 11:56
Clarify pointer alignment for `Handle`
The method is used from outside of this module, so the comment seems unnecessary: the method should either be private or it should be public.
The method is not meant to be used outside of the crate.
…d-proc-macros

Remote types: interfaces and proc macros ADR
`Option<&T>` was never supported as far as I can tell.  I added some
tests on top of e10a7f9, where that
documentation was added and it didn't work.
…t`. (mozilla#2173)

`error_buf` is owned by the foreign side. Because we assume it has been initialized
we use `ManuallyDrop` instead of `MaybeUninit`, which clarifies ownership
and avoids unsafe code.

Fixes mozilla#2168
…entries` usage on `Kotlin >= 1.9.0` and keep backwards compatibility with previous versions
…r-enums

Kotlin: use `Enum.entries` instead of `Enum.values()`
We're moving towards making this an optional dependency.
Don't use cargo_metadata to parse version numbers
This avoids crashing for consumers that set panic=abort (Firefox).

- Updated the Err type for `rust_call`.  The closure can now return an
  internal error.  The only way to signal an internal error before was
  to panic.
- Reworked the `LowerReturn` trait and the future code to work with the
  new system.
- Added a type for argument lift errors, this makes the rustfuture
  signatures nicer.
…eature. (mozilla#2200)

The `uniffi_test` crate unconditionally depends on `cargo_metadata`, and this will be
difficult to change. This means that because `uniffi_test` is an unconditional dependency
of `uniffi_bindgen`, the `cargo_metadata` feature doesn't actually prevent `uniffi_bindgen`
from depending on `cargo_metadata`.

The top level `uniffi` create already has a feature `bindgen-tests`. This patch
introduces a feature of the same name to `uniffi_bindgen`. Enabling that feature also
enables the metadata feature. This means that if you do not enable either of these features
you should be able to avoid `cargo_metadata`.

This patch also renames the new `cargo_metadata` feature to be `cargo-metadata` to
be more consistent with our existing features and Rust feature naming in general.
…lla#2201)

This continues the cargo_metadata feature work but making the execution
of cargo_metadata the resonsibility of the uniffi_bindgen callers
rather that executing it implicitly. This means the CLI,
which in-turn means the top-level uniffi crate also gets a
`cargo-metadata` feature.

This reverts what we did to fix mozilla#2183 - by making `no_deps` the
default, it means we will be unable to support reuse of UniFFI
components, because it means we only support all components
being in the same workspace. While this is a common use-case,
it's not the only use-case we want to support. So grabbing
all dependencies from cargo_metadata is again the default, but
there's a new command-line option to avoid it.

It also replaces some of mozilla#2195.
gruberb and others added 24 commits July 31, 2024 21:18
…lla#2195)

* Thread `ExternalType` metadata into RustBuffer

In service of Java bindgen being able to generate fully qualified
`RustBuffer`s when necessary.

* Switch to `test --no-run` from `build` for cdylib

`uniffi-bindgen-java` is external to the uniffi repo, so the
fixtures/examples are all `dev-dependencies`, which aren't built on a
call to `cargo build`. `cargo test --no-run` causes them to be built but
doesn't cause a run of tests in place.
Replace templating filters for Python
I'm hoping to do a 0.28.1 release and these would be good to have in it.
I also considered adding an entry for the work that mgeisler has been
doing, but I couldn't think of a good wording for that.
Adding changelog entries for merges since 0.28.0
The generate_bindings docs mentioned wanting to expose a function that
just finds ComponentInterface and config tables for each component and
leaves the rest to the external bindings generator.  This is exactly
what I want to use for uniffi-bindgen-gecko-js.

The `find_components` function was pretty much exactly what we wanted.
I made some minor changes to it and exposed it as a pub function.
Expose the find_components function
@bendk bendk requested a review from a team as a code owner August 9, 2024 19:31
@bendk bendk requested review from jeddai and removed request for a team August 9, 2024 19:31
Copy link
Member

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit of a rubber stamp, but r=me

@bendk bendk merged commit 2296746 into mozilla:release-v0.28.x Aug 13, 2024
5 checks passed
@bendk bendk deleted the release-v0.28.x branch September 5, 2024 14:07
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

Successfully merging this pull request may close these issues.

9 participants