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

build: upgrade rusqlite 0.31 → 0.33 #6566

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ErichDonGubler
Copy link
Contributor

@ErichDonGubler ErichDonGubler commented Jan 23, 2025

Known outstanding dependencies before merge

  • Upgrade Rust MSRV in mozilla-central to 1.82: bug 1945020

  • Figure out cc dependency upgrade: bug 1945694

    Current naive upgrade to latest breaks sanitizer builds. 😩

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

Branch builds: add [firefox-android: branch-name] to the PR title.

@ErichDonGubler
Copy link
Contributor Author

Context: This is part of landing an upgrade to hashbrown that affects a lot of crates in mozilla-central. I'm hoping the migration isn't too bad. 😅

@mhammond
Copy link
Member

This will require bumping libsqlite3-sys to the matching version, which appears to be "0.31.0"

@ErichDonGubler ErichDonGubler force-pushed the rusqlite-0.33 branch 2 times, most recently from 8f9d20e to 28562d4 Compare January 24, 2025 02:56
@ErichDonGubler

This comment was marked as resolved.

@ErichDonGubler

This comment was marked as resolved.

@glandium
Copy link
Contributor

permits a minimum Rust version of 1.78.

Correction, it's 1.76 currently. It's bumpable, but I would also argue that bindgen should not force a MSRV onto people.

@glandium
Copy link
Contributor

I don't see a bindgen change in your patch, though, so why would it start relying on 1.82 features out of the blue?

@glandium
Copy link
Contributor

This comes down to rust-lang/rust-bindgen#3052

@glandium
Copy link
Contributor

Note that if you don't touch bindgen on central, you won't be affected.

@glandium
Copy link
Contributor

Ah, it's the pre-generated bindings for libsqlite3-sys that cause problems.

@glandium
Copy link
Contributor

Opened rusqlite/rusqlite#1625.

@ErichDonGubler

This comment was marked as resolved.

@ErichDonGubler
Copy link
Contributor Author

ErichDonGubler commented Jan 24, 2025

@glandium: Unfortunately, the maintainer of cc has marked that bug with an invalid tag. It seems unlikely that we will persuade them to revert that change. 🫤

Opened rusqlite/rusqlite#1625.

Given this and that rusqlite is starting to use #[expect(…) (like WGPU has been hoping to), perhaps this is a strong enough reason to bump mozilla-central?

@glandium
Copy link
Contributor

Add the missing symbol to third_party/sqlite3/src/sqlite.symbols

@ErichDonGubler

This comment was marked as resolved.

@ErichDonGubler
Copy link
Contributor Author

ErichDonGubler commented Jan 31, 2025

With the queuing of patches for an upgrade of the minimum Rust version in mozilla-central to land via bug 1945020, I believe this is now ready to come out of draft, with merging a question of timing with review for the remaining patches in bug 1943149. 😀

@ErichDonGubler ErichDonGubler marked this pull request as ready for review January 31, 2025 03:20
@ErichDonGubler
Copy link
Contributor Author

☝🏻 Given this, it seems the run-tests-min-supported-version check needs to be updated, but is not part of this repo? 🤔

@ErichDonGubler

This comment was marked as resolved.

@ErichDonGubler
Copy link
Contributor Author

@mhammond: The Rust update to 1.82 has been queued for landing (bug 1945020), and we've discovered that the latest versions of cc have breakages that we need to adjust for in mozilla-central. We might be able to work around cc breakage by using a lower version of it here.

Once those are satisfied, I wanted to confirm: @mhammond, is there anything else you see as blocking this PR?

@mhammond
Copy link
Member

mhammond commented Feb 6, 2025

Because rusqlite is vendored into m-c quite regularly and is done by a variety of teams, I do think we need to be confident that continues to work - ie, I don't think it's OK to land this with a known issue in m-c. But apart from that I'm happy to see this, thanks!

@ErichDonGubler
Copy link
Contributor Author

@mhammond: I have confirmed that Firefox continues to compile as before with a shim crate adapting a dependency on rusqlite 0.31.0 to actual usage of 0.33.0 for all but application-services crates, which required the migrations present in this PR. I haven't exhaustively tested things, but I suspect things should Just Work™ on the rusqlite front.

@mhammond
Copy link
Member

mhammond commented Feb 7, 2025

Great, thanks for checking, this seems good to go then!

mhammond
mhammond previously approved these changes Feb 7, 2025
@ErichDonGubler
Copy link
Contributor Author

I'll add known outstanding blockers to the OP, so we don't forget that are still blockers with the Rust 1.76 → 1.82 upgrade (which got backed out 😮‍💨) and an upgrade of the cc crate.

@mergify mergify bot dismissed mhammond’s stale review February 8, 2025 18:59

The pull request has been modified, dismissing previous reviews.

@ErichDonGubler ErichDonGubler force-pushed the rusqlite-0.33 branch 2 times, most recently from b8676c5 to 5628855 Compare February 12, 2025 20:08
@ErichDonGubler ErichDonGubler force-pushed the rusqlite-0.33 branch 2 times, most recently from b73f9bf to 026364d Compare February 26, 2025 01:35
@ErichDonGubler
Copy link
Contributor Author

The dependencies for this PR are now satisfied in Firefox upstream! 😀 This PR should be ready to go.

I noticed that dependencies documentation needed changes, even before the substantive changes (!?) of this PR, so I've split out the changes from the output of tools/regenerate_dependency_summaries.sh into a commit before the actual update of rusqlite.

I'm consuming this PR preemptively in the patch stack for bug 1947920, to ensure that things are working as intended downstream.

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.

3 participants