Closed Bug 1840044 Opened 1 year ago Closed 1 year ago

Update to uniffi v0.24.1 and land Glean & appservices update in m-c

Categories

(Data Platform and Tools :: Glean: SDK, task, P1)

task

Tracking

(firefox117 fixed)

RESOLVED FIXED
Tracking Status
firefox117 --- fixed

People

(Reporter: janerik, Assigned: janerik)

References

Details

Attachments

(5 files)

We need to upgrade uniffi in Glean and land that here in m-c.
This requires updates in appservices and changes to the uniffi-bindgen-gecko-js parts.

appservices & uniffi-bindgen-gecko-js will be handled by the a-s team though.

Assignee: nobody → jrediger
Type: defect → task
Priority: P3 → P1
Whiteboard: [telemetry:glean-rs:m?]

NOT YET READY!
This is for local testing. It still requires:

  • appservices update
  • mach vendor rust
  • Changes to uniffi-bindgen-gecko-js
  • Running mach uniffi generate to update in-tree files

The duplicated deps will go away with the appservices update.

Some more steps for the Glean/A-S/UniFFI update:

  • Updated to the app-services to the uniffi-0.24 branch.
  • Updated rusqlite in toolkit/library/rust/shared/Cargo.toml
  • Updated uniffi-bindgen-gecko-js to work with the new UniFFI. Also
    updated it's askama version.
  • Vetted new cargo dependencies:
  • ran mach vendor rust
  • ran mach uniffi generate

TODO:

  • Fix the callback interface code (the unit test is currently failing)
  • Merge the application-services uniffi-0.24 branch and use a commit
    from main instead.
  • There's a comment in toolkit/library/rust/shared/Cargo.toml
    about "rusqlite's bindings file", that I don't understand. Check if
    any more action is needed here.
  • Double-check the cargo vet updates. I did this fairly blindly,
    should some of the vettings have more info? Should I actually go
    through the diff of the prost changes?
Attachment #9340682 - Attachment description: WIP: Bug 1840044 - Update to next Glean & UniFFI 0.24.1 → WIP: Bug 1840044 - Update to Glean 53.1.0 & UniFFI 0.24.1

Ran mach vendor rust and mach uniffi generate. Checking this in as
a separate commit to simplify review.

Depends on D182286

Duplicate of this bug: 1841146
Blocks: 1839426
Summary: Update to uniffi v0.24.1 and land Glean update in m-c → Update to uniffi v0.24.1 and land Glean & appservices update in m-c
Attachment #9340682 - Attachment description: WIP: Bug 1840044 - Update to Glean 53.1.0 & UniFFI 0.24.1 → Bug 1840044 - Update to Glean 53.1.0, UniFFI 0.24.1 and latest application-services. r?TravisLong!,nika!,markh!
Pushed by jrediger@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93b5aead9fb9 Update to Glean 53.1.0, UniFFI 0.24.1 and latest application-services. r=TravisLong,nika,markh,supply-chain-reviewers

That's a tough one. I hit that earlier locally already, but thought (hoped?) we wouldn't hit that on CI (Ben didn't encounter this in his testing). This might be https://github.com/rust-lang/rust/issues/113104 -- I'm looking into how to mitigate it, and what we can report to rust.

Flags: needinfo?(jrediger)

Not usable as is, but this avoids the problem:

diff --git a/uniffi_meta/Cargo.toml b/uniffi_meta/Cargo.toml
index 3f4f0adb..df68955d 100644
--- a/uniffi_meta/Cargo.toml
+++ b/uniffi_meta/Cargo.toml
@@ -14,4 +14,3 @@ bytes = "1.3"
 serde = { version = "1.0.136", features = ["derive"] }
 siphasher = "0.3"
 uniffi_checksum_derive = { version = "0.24.0", path = "../uniffi_checksum_derive" }
-uniffi_core = { path = "../uniffi_core", version = "=0.24.0" }
diff --git a/uniffi_meta/src/lib.rs b/uniffi_meta/src/lib.rs
index 074fdb20..4eaf69d8 100644
--- a/uniffi_meta/src/lib.rs
+++ b/uniffi_meta/src/lib.rs
@@ -16,6 +16,9 @@ pub use group::{group_metadata, MetadataGroup};
 mod reader;
 pub use reader::{read_metadata, read_metadata_type};
 
+#[path = "../../uniffi_core/src/metadata.rs"]
+mod metadata;
+
 /// Similar to std::hash::Hash.
 ///
 /// Implementations of this trait are expected to update the hasher state in
diff --git a/uniffi_meta/src/reader.rs b/uniffi_meta/src/reader.rs
index 037d1d01..2f2b2251 100644
--- a/uniffi_meta/src/reader.rs
+++ b/uniffi_meta/src/reader.rs
@@ -4,7 +4,7 @@
 
 use crate::*;
 use anyhow::{bail, Context, Result};
-use uniffi_core::metadata::{checksum_metadata, codes};
+use crate::metadata::{checksum_metadata, codes};
 
 pub fn read_metadata(data: &[u8]) -> Result<Metadata> {
     MetadataReader::new(data).read_metadata()
Flags: needinfo?(jrediger)
Attachment #9340682 - Attachment description: Bug 1840044 - Update to Glean 53.1.0, UniFFI 0.24.1 and latest application-services. r?TravisLong!,nika!,markh! → Bug 1840044 - Update to Glean 53.1.0, UniFFI 0.24.1 and latest application-services. r?TravisLong!,markh!
Blocks: 1834792
Flags: needinfo?(jrediger)
Pushed by jrediger@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b65b154c05c3 Update to Glean 53.1.0, UniFFI 0.24.1 and latest application-services. r=TravisLong,nika,markh,supply-chain-reviewers
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Regressions: 1846223
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: