Added a new crate called `rust-log-forwarder` that forwards logs to
consumers. This does basically the same thing as `rc-log`, but it uses
UniFFI. Once our consumer apps swich over to `rust-log-forwarder`, we
can remove the `rc-log` component.
This is what UniFfi expects and will start enforcing soon. When I was
testing app-services with the current code, I got errors because the
`UniFfiTag` struct was not in the crate root.
Made a bunch of things `pub` that weren't before. This seems logical,
since we're exporting those things in our UniFfi API. It also was the
simplest way to make the import work.
* fix various nimbus gradle plugin issues
* fix newline at end of file and adjust pathing for applicationServicesDir
* adjust nimbus fml cli to only include the R class in imports if it will be used
* fix clippy errors and update changelog
* Update components/support/nimbus-fml/src/backends/kotlin/gen_structs/bundled.rs
Co-authored-by: jhugman <jhugman@users.noreply.github.com>
* adjust for pr feedback
* fix formatting
---------
Co-authored-by: jhugman <jhugman@users.noreply.github.com>
* Consolidate the various types used for a "collection name" - now we
use `Cow` rather than the various `&'static str`, `&str` and `String`
used previously.
* This made it easier to clean up the `LocalCollState` state machine
to have the `Ready` state directly provide the `CollState` due to
a mismatch between `'static str` and `String` reprs of collections.
* No longer store the outgoing timestamp in an OutgoingChangeset - it was
never actually used and just creates unnecessary complexity.
* OutgoingChangsets now always supply the BSOs as they are created,
meaning less `mut` objects.
* Bonus fix to unbreak the `places-utils` example.
This discusses updating our release process so that we get code merged
into our consumers more frequently and to prepare us for a monorepo
world.
See the ADR for details.
* fix various nimbus gradle plugin issues
* update changelog
* fix newline at end of file and adjust pathing for applicationServicesDir
* set default cache dir to be root build directory
---------
Co-authored-by: jhugman <jhugman@users.noreply.github.com>
Updating to 4.5.3 and start using the official builds from zetetic.net.
This is needed for #5354. I was able to verify this one with their GPG
key so I think it should be trusted.
- Switched to using workspace dependencies, this will make future
updates much simpler
- Updated code to work with the new UniFFI crate structure
- Updated the error-support integration tests to work with the workspace
dependencies, following this advice: https://stackoverflow.com/a/71461114.
* [demo] handle_error as a proc macro
* Adds more tests
* Rework handle_error proc macro to take no arguments
* ignore rustdoc since it doesn't have expore to error_support
* Removes function signature validation
* Add the nimbus-gradle-plugin to application services
* update nimbus gradle plugin and settings to pre-build
* update class path and adjust nimbus fml cli versioning logic
* adjust nimbus-gradle-plugin to support non-android projects
* update includebuild to also substitute dependencies
* Update iOS docs for adding a new component.
* Fix the path to `MozillaTestServices.xcodeproj`.
* Clarify that the generated bindings for the component should be added
after the UDL file. When adding a UniFFIed component for the first
time, the `Generated` subdirectory won't exist until after the UDL
file has been added to the project, _and_ Xcode has run
`uniffi_bindgen` to generate the `.swift` file.
* Add a note to double-check that the new `.udl` file is _not_ added as
a bundle resource (it should be added as a source), and the generated
`.swift` file isn't added at all. Xcode's "add files" dialog likes to
add files to a target, which will cause a cryptic build cycle error
in this case.
* The "Headers" phase has been removed; it looks like it's not necessary
to add `<your_crate_name>FFI.h` to the list of Public headers anymore.
* Fix the module name for tests.
* Add the Apple silicon iOS simulator Rust target.
We currently install the Intel iOS Simulator target, but not the Apple
silicon iOS Simulator target. Without the latter, `build-xcframework.sh`
can't build the framework on an M1 Mac.
Co-authored-by: Tarik Eshaq <teshaq@mozilla.com>
There's a known issue where Android sends invalid URLs to us. We've
gotten about as much as we can from the Sentry reports and at this point
they're more noise then helpful.
See https://github.com/mozilla/application-services/issues/5235 for
details.
We previously could not roundtrip a JSON string which has an unknown
device_type value - we'd deserialize it as `Some(DeviceType::Unknown)`,
which we'd then fail to serialize as we explicitly forbid serializing a
`DeviceType::Unknown`.
We fixed this in 2 ways:
* Serializing `Some(DeviceType::Unknown)` now serializes it as though it
was None (ie, as null) - just in-case our Rust code manages to explicitly
set it to `Some(DeviceType::Unknown)`.
* Deserializing an unknown enum value now stores it as `None` instead of
`Some(DeviceType::Unknown)` (ie, so the point above should never actually
happen in practice)