Teach `mach vcs-setup` to tune git configuration in the same way it tunes hg configuration
Categories
(Firefox Build System :: Bootstrap Configuration, enhancement, P3)
Tracking
(firefox80 fixed)
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: nalexander, Assigned: mhentges)
Details
(Keywords: in-triage)
Attachments
(1 file)
I'm evaluating using git for developing on m-c, and there's a great deal of git performance configuration possible -- and possibly required -- to get acceptable performance. There's code to do some tuning but it seems to be tied to cloning and not used to help get developers into the best possible state.
Concurrently, it would be nice if this was expanded. Locally, I've found
core.commitGraph
core.fsmonitor
core.splitIndex
core.untrackedCache
seem to make git usable with a fresh clone.
Comment 1•5 years ago
|
||
fsmonitor
has behaved really poorly on my Mac for me so I'm not sure enforcing it globally makes sense. The rest, sure.
Comment 2•5 years ago
|
||
core.commitGraph
is enabled by default since git 2.24. The pref itself exists since 2.18. It feels to me we should rely on the default and push people to use a more modern version of git if theirs is too old, like we do for mercurial.
core.untrackedCache
had a bug before 2.17, so we probably shouldn't enable it on these older versions.
Comment 3•5 years ago
|
||
I tried core.splitIndex
at the suggestion of comment 0 and it caused all my builds to unconditionally fail in cargo
because it depends on libgit2
which appears to not support splitIndex
, so that's probably a no-go :)
Comment 4•5 years ago
|
||
What the hell does cargo do with the index?
Comment 5•5 years ago
|
||
I guess it's using git
(via libgit2
) to determine whether crates need to be rebuilt? At least, that's the only thing I can possibly conclude from the error:
1:52.99 error: failed to determine package fingerprint for build script for geckodriver v0.26.0 (/Users/rickystewart/src/mozilla-unified/testing/geckodriver)
1:52.99 Caused by:
1:52.99 failed to determine the most recently modified file in /Users/rickystewart/src/mozilla-unified/testing/geckodriver
1:52.99 Caused by:
1:52.99 failed to determine list of files in /Users/rickystewart/src/mozilla-unified/testing/geckodriver
1:52.99 Caused by:
1:53.00 failed to open git index at /Users/rickystewart/src/mozilla-unified/.git/
1:53.00 Caused by:
1:53.00 unsupported mandatory extension: 'link'; class=Index (10)
1:53.02 make[4]: *** [force-cargo-program-build] Error 101
1:53.02 make[3]: *** [testing/geckodriver/target] Error 2
If that's true, that's news to me. I had no idea cargo
even knew what git
is, beyond calling git init
for me when I do cargo init
.
Comment 6•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
Based on the above discussion, I'll change vcs-setup
to do:
- Enable
untrackedCache
by default - Recommend users use a git version that is at least
2.24
to improve performance
Assignee | ||
Comment 8•5 years ago
|
||
Also adds a warning if a user's git version is older than 2.24
Comment 10•5 years ago
|
||
bugherder |
![]() |
||
Comment 11•5 years ago
|
||
Backed out due to bug 1651542:
https://hg.mozilla.org/integration/autoland/rev/739056dc4d11ec7953df7559309d5c958e136acd
Comment 12•5 years ago
|
||
The backout didn't help and the tests are still failing. See bug 1651542 comment 14 for details.
Mitchell, feel free to reland your patch.
Comment 14•5 years ago
|
||
![]() |
||
Comment 15•5 years ago
|
||
Backout got merged: https://hg.mozilla.org/mozilla-central/rev/739056dc4d11
Comment 16•5 years ago
|
||
bugherder |
Description
•