Get an empty integration layer crate to build
Categories
(Toolkit :: Telemetry, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox72 | --- | fixed |
People
(Reporter: chutten|RustWeek, Assigned: chutten|RustWeek)
References
Details
Attachments
(2 files, 1 obsolete file)
According to the FOGotype Design Proposal, the Firefox Integration Layer will be a Rust crate living in mozilla-central.
That's lacking a bit in detail:
- Where in the tree should it live? Under
toolkit/components/telemetry? - What should we name it?
- How can we integrate it with the build system? (there are resources in the notes)
- How will we wrap it in such a way that C++ code can call it? And that it can call C++ code? Or JS code, if that's where the networking will be done?
- How will we ensure this code is only built when we want it to be (for now: only in Nightly)
(( and this is all before we even actually call any Glean code or supply a mechanism for sending pings and stuff ))
Answer these questions, document anything that we might want to remember later, and build a nutrition-free Integration Layer that builds, and does nothing else.
| Assignee | ||
Comment 1•6 years ago
|
||
Proposal:
- It should live in
toolkit/components/telemetry - It should be named
fog - It will be integrated in the usual way
- We should move figuring out the wrapping stuff later. This isn't the right bug for that.
- As for how to ensure this code is only in Nightly and dev builds, I asked :lina about that and she said (I only did a little reformatting):
check out
MOZ_NEW_XULSTORE! you'd add a flag to moz.configure first, to gate it to nightly
then reflect that flag into a cargo feature, so you can reference it in Cargo.toml and[cfg(feature)]
then add your crate as an optional dependency here
and another feature here
and finally, annotate the extern crate annotation with[cfg(feature)]
Essentially, if we can write the moz.configure code necessary to detect the conditions we want, this^ is the plumbing for how to get it from moz.configure to where we need it.
Good enough for you, Alessio?
Comment 2•6 years ago
|
||
(In reply to Chris H-C :chutten from comment #1)
Essentially, if we can write the
moz.configurecode necessary to detect the conditions we want, this^ is the plumbing for how to get it frommoz.configureto where we need it.Good enough for you, Alessio?
This sounds good enough for sure!
| Assignee | ||
Comment 3•6 years ago
|
||
There was also one more place I needed to put it: toolkit/library/rust/Cargo.toml Otherwise toolkit/library/rust/shared/ doesn't get told about it.
| Assignee | ||
Comment 4•6 years ago
|
||
| Assignee | ||
Comment 5•6 years ago
|
||
Depends on D53713
| Assignee | ||
Comment 6•6 years ago
|
||
I tested that the crate doesn't build in non-Nightly configurations by changing config/milestone.txt to be for b1 instead of a1 and by putting a syntax error in the crate. Firefox built successfully. Then I put a1 back, and Firefox failed to build. Then I removed the syntax error, and Firefox built.
Comment 8•6 years ago
|
||
Backed out 2 changesets (bug 1591563) for build bustages force-cargo-library-build and tools/lint/license/valid-licenses.txt (license)
Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=276982991&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&revision=c533ffe37892f7f12ba80c7dd924551838326fe5
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=276983029&repo=autoland&lineNumber=5012
also: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=276983002&repo=autoland&lineNumber=290
Backout: https://hg.mozilla.org/integration/autoland/rev/38109af18ca5c81de9e5652497bd7acc55c39012
| Assignee | ||
Comment 9•6 years ago
|
||
Huh. Once again pointing out how local builds don't match actual builds. I'll look into it.
| Assignee | ||
Comment 10•6 years ago
|
||
There was another place I needed to put it: toolkit/library/gtest/rust/Cargo.toml Otherwise when it's building gkrust-gtest it doesn't know if it should include fog or not. New try here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=11bea026a57e697bdf9d9cd0cfce1d2bd09e3080
Also also, I needed to provide a license that was recognized by lint. (I chose MPL2)
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Backed out 2 changesets (bug 1591563) for Spidermonkey failures. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#?job_id=277532304&repo=autoland
https://treeherder.mozilla.org/logviewer.html#?job_id=277527808&repo=autoland
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=53d79a9ad34f8cef1a59e58a2837cb80d514fde2
Backout:
https://hg.mozilla.org/integration/autoland/rev/d2f29b3280e5ba3cc40ded14dd3ca76962c5032e
| Assignee | ||
Comment 13•6 years ago
|
||
[task 2019-11-22T02:46:48.150Z] error: the lock file /builds/worker/workspace/build/src/Cargo.lock needs to be updated but --frozen was passed to prevent this
Not quite sure what this is all about. Maybe I need to run mach vendor rust or something?
| Assignee | ||
Comment 14•6 years ago
|
||
I ran cargo update -p gkrust-shared and it bumped the version of rand. I've pushed that to try over here and have it running spidermonkey stuff (which was kinda hard to find. It's not in the chooser and it's not in "Add new jobs". I had to look in "Add new jobs (search)")
Let's see if it's that.
| Assignee | ||
Comment 15•6 years ago
|
||
Depends on D53714
| Assignee | ||
Comment 16•6 years ago
|
||
Hey :lina, what do you think? Should I put a section in the docs about how to do this feature stuff?
Updated•6 years ago
|
Comment 17•6 years ago
|
||
Comment 18•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/abaaa881428e
https://hg.mozilla.org/mozilla-central/rev/418a4b4c4de7
| Assignee | ||
Updated•6 years ago
|
Description
•