Closed Bug 1765921 Opened 3 years ago Closed 3 years ago

Add a dummy rust crate for FOG

Categories

(Toolkit :: Telemetry, task, P1)

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: bas.schouten, Assigned: chutten)

References

Details

Attachments

(2 files)

Adding a dummy rust crate to crates.io like we do for mozbuild might make it easier for rust crates which have to build outside of Gecko to depend on FOG. Currently some trickery is needed to make this work.

See: https://phabricator.services.mozilla.com/D140681

Due to this 5-year-old cargo bug depending on fog for building in gecko means there has to be a crate called fog around somewhere even when it's not needed because we're not building in gecko. The way mozbuild handles it is by having published a v0.1.0 crate that is empty.

fog is presently only used by path dependency so as long as it stays at 0.1.0 locally this should work. I think?

(In reply to Chris H-C :chutten from comment #1)

Due to this 5-year-old cargo bug depending on fog for building in gecko means there has to be a crate called fog around somewhere even when it's not needed because we're not building in gecko. The way mozbuild handles it is by having published a v0.1.0 crate that is empty.

fog is presently only used by path dependency so as long as it stays at 0.1.0 locally this should work. I think?

It is no longer only used by path, since things that need to build externally can't depend on something outside their subtree (WebRender being the prime example here :-)). But yeah, that means as long as it stays at 0.1.0 the crate just existing on crates.io would work fine.

See Also: → 1754020

Slight issue: fog is already taken

I guess that means our options are

  1. Use the fog crate which is empty anyway (but we have no control over whether that changes)
  2. Rename our fog crate to something else (firefox-on-glean? glean-fog?), then publish an empty crate for that name
  3. Someone (Bas? Jan-Erik?) comes up with a way that doesn't involve having same-named crates both vendored locally and published to crates.io
Flags: needinfo?(jrediger)
Flags: needinfo?(bas)

1 is dangerous.
Rename might be the easiest really.

Flags: needinfo?(jrediger)
Assignee: nobody → chutten
Severity: -- → N/A
Status: NEW → ASSIGNED
Priority: -- → P1

This matches the empty-and-published-to-crates.io crate, which should allow for
easier optional dependencies in Rust.

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:chutten, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(tlong)
Flags: needinfo?(chutten)

There's more to do here, but mostly it's waiting until Fx111 has begun. I also intend to let bug 1805427 go first. There's no more to do with that patch, but it has external dependencies that need consideration, so I don't think "Plan Changes" is appropriate.

Flags: needinfo?(tlong)
Flags: needinfo?(chutten)
Flags: needinfo?(bas)
Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b4dba80235dc Rename `fog` crate to `firefox-on-glean` r=TravisLong,supply-chain-reviewers

Backed out changeset b4dba80235dc (Bug 1765921) for causing WR bustages.
Backout link
Push with failures <--> wrench-deps
Failure Log

Flags: needinfo?(chutten)

Weird. Is the Toolchains task not build as part of a local mach build? Oh well. I've fixed the (now-obvious) problem and reviewed the rest of the diff for similar faults (none). We'll see if https://treeherder.mozilla.org/jobs?repo=try&revision=19facfd4309cb3381f7321513fd77ed05f186ed5 shows green for landing tomorrow.

Flags: needinfo?(chutten)
Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/25f6dcab455c Rename `fog` crate to `firefox-on-glean` r=TravisLong,supply-chain-reviewers
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: