Closed Bug 1990108 Opened 1 month ago Closed 22 days ago

Update ohttp and bhttp crates to git rev bf6a983845cc0b540effb3a615e92d914dfcfd0b

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox145 fixed)

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: markh, Assigned: markh)

References

Details

Attachments

(3 files)

The intention is to get application-services and mozilla-central on to the same version. This revision was chosen carefully because:

  • Going to a later commit, including 0.7, will bump the version of toml to 0.9, which will be a duplicate of the 0.5 version in m-c, and there's no simple path to updating all deps to 0.9.

  • We can't use an official 0.6 release because we need the version bump to bindgen to avoid the iOS problem we had in a-s, which happened between 0.6 and 0.7

  • We could go directly to 0.7 if we can tolerate a dupe of toml - but there's a good chance that identical code can't be used for both versions (at least for uniffi itself, the bump required code calling it to change, so the "usual" hacks we do in this scenario may not work.

Rev bf6a983845cc0b540effb3a615e92d914dfcfd0b is the commit which bumps the bindgen version we need, but before the toml version bump which we do not. App services is currently on a slightly later git revision so does have a dupe toml.

Assignee: nobody → markh
Status: NEW → ASSIGNED
Duplicate of this bug: 1988780

also an msr issue? - https://treeherder.mozilla.org/jobs?repo=try&revision=d2c162f517f2ecfcd932fff6aca8473a7ddd4df6 - error[E0658]: raw address of syntax is experimental

If there are problems with the TOML crate, I'm happy to do a point release on 0.7 to rewind it. It's not a critical dependency.

As for MSRV issues, the crate is tested against 1.82. Where are you at?

(In reply to Martin Thomson [:mt:] from comment #4)

If there are problems with the TOML crate, I'm happy to do a point release on 0.7 to rewind it. It's not a critical dependency.

I think it is inevitable that we will need to move eventually. But best I can tell, all the tests pass with toml specified in your repo as toml = ">=0.5, <=0.9 which seems the best of both worlds - would you like this as a PR?

As for MSRV issues, the crate is tested against 1.82. Where are you at?

huh, this is m-c, and the failed job reports itself as using rust "1.82.0-dev". The feature in question seems to be https://github.com/rust-lang/rust/pull/127679 which says it is in 1.82.0 - so I'm really not sure what's going on. An example of the failure is:

[task 2025-09-22T22:05:48.699+00:00] 22:05:48    ERROR -  error[E0658]: raw address of syntax is experimental
[task 2025-09-22T22:05:48.699+00:00] 22:05:48     INFO -    --> /builds/worker/checkouts/gecko/third_party/rust/ohttp/src/nss/p11.rs:90:17
[task 2025-09-22T22:05:48.699+00:00] 22:05:48     INFO -     |
[task 2025-09-22T22:05:48.700+00:00] 22:05:48     INFO -  90 |                 &raw mut key_item,
[task 2025-09-22T22:05:48.700+00:00] 22:05:48     INFO -     |                 ^^^^^^^^
[task 2025-09-22T22:05:48.700+00:00] 22:05:48     INFO -     |
[task 2025-09-22T22:05:48.700+00:00] 22:05:48     INFO -     = note: see issue #64490 <https://github.com/rust-lang/rust/issues/64490> for more information
[task 2025-09-22T22:05:48.700+00:00] 22:05:48     INFO -     = help: add `#![feature(raw_ref_op)]` to the crate attributes to enable
[task 2025-09-22T22:05:48.700+00:00] 22:05:48     INFO -     = note: this compiler was built on 2024-08-04; consider upgrading it if it is out of date

and repeats for every &raw mut. However, I note this output says the compiler was built 2024-08 but the 1.82.0 release was announced on 2024-10-17 - so we are on a pre-release? Glandium, do you know what's going on here?

Flags: needinfo?(mh+mozilla)

I'd be happy to make the change, but - in the interests of credit where due - if you supply a PR in the next few days, I'll merge it and generate a fresh release. There are changes on trunk that will likely affect your code, but only in a positive way: I've changed an argument to & rather than &mut.

@jcristau tells me in matrix that the problem with 1.82 is almost certainly https://searchfox.org/firefox-main/source/taskcluster/kinds/fetch/toolchains.yml#424.

Flags: needinfo?(mh+mozilla)

Authored by https://github.com/mhammond
https://github.com/mozilla/application-services/commit/b02cf2176ef751e9ee676b79d5c30435d9799e3e
[main] Use a slightly earlier ohttp version to eventually match bug 1990108 on desktop (#6968)

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Flags: qe-verify+
Resolution: --- → FIXED

oops, this need to remain open.

I'd be happy to make the change, but - in the interests of credit where due

Not worried about credit here, so feel free to make the change. If it hasn't been made by the time we sort out the frankenstein 1.82 issue I'll put one up, thanks.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

https://github.com/martinthomson/ohttp/commit/7e98e49bdd61ba448288bb9aaf8243e6f837fdca addresses the toml issue (update: the toml feature set changed, so I don't get to use --no-default-features)

The question about &raw is harder. I could remove the use of that and set #[allow(clippy::raw_whatever)] if you like. That's assuming that the patched pre-1.82 compiler we're using is happy with code that claims to need 1.82.

Thanks - glandium mentioned he thinks we might be moving to a later compiler "soon" - but as usual it's impossible to know how soon that actually means. This is going to block moving app-services into the mono-repo, but that's still some time away.

This applies the patches in https://github.com/rust-lang/rust/pull/127679, although
miro and test chunks were removed as they didn't apply.

Attachment #9514862 - Attachment description: Bug 1990108 - Update ohttp and bhttp crates to git rev bf6a983845cc0b540effb3a615e92d914dfcfd0b. r?glandium → Bug 1990108 (part 2) - Update ohttp and bhttp crates to git rev bf6a983845cc0b540effb3a615e92d914dfcfd0b. r?glandium
Pushed by mhammond@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/17c4a9d25bf2 https://hg.mozilla.org/integration/autoland/rev/e4312178918d (part 1) - Stabilize raw_ref_op in our patched Rust compiler. r=glandium https://github.com/mozilla-firefox/firefox/commit/655a08675015 https://hg.mozilla.org/integration/autoland/rev/9f0926c563e4 (part 2) - Update ohttp and bhttp crates to git rev bf6a983845cc0b540effb3a615e92d914dfcfd0b. r=necko-reviewers,supply-chain-reviewers,toolkit-telemetry-reviewers,valentin,janerik
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d061baf359c3 https://hg.mozilla.org/integration/autoland/rev/3d062583aac4 Revert "Bug 1990108 (part 2) - Update ohttp and bhttp crates to git rev bf6a983845cc0b540effb3a615e92d914dfcfd0b. r=necko-reviewers,supply-chain-reviewers,toolkit-telemetry-reviewers,valentin,janerik" for causing xpcshell failures on test_ohttp_client.js

Backed out for causing xpcshell failures on test_ohttp_client.js

Backout link

Push with failures

Failure log

Flags: needinfo?(markh)
Status: REOPENED → RESOLVED
Closed: 1 month ago24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 145 Branch → ---
Pushed by mhammond@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/28380f767f7f https://hg.mozilla.org/integration/autoland/rev/88ee9a71fe7d (part 1) - Stabilize raw_ref_op in our patched Rust compiler. r=glandium https://github.com/mozilla-firefox/firefox/commit/dbe1fb5b3351 https://hg.mozilla.org/integration/autoland/rev/9d455cb6a47f (part 2) - Update ohttp and bhttp crates to git rev bf6a983845cc0b540effb3a615e92d914dfcfd0b. r=necko-reviewers,supply-chain-reviewers,toolkit-telemetry-reviewers,valentin,janerik
Status: REOPENED → RESOLVED
Closed: 24 days ago22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
Flags: needinfo?(markh)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: