push-to-try: watchman command error: RootResolveError
Categories
(Firefox Build System :: Mach Core, defect)
Tracking
(firefox97 fixed)
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: barret, Assigned: barret)
Details
Attachments
(1 file)
When running ./mach try, I get the following error from watchman several times:
warning: Watchman unavailable: watchman command error: RootResolveError: unable to resolve root c:\users\barret\workspace\src\hg.mozilla.org\mozilla-central: "c:\users\barret\workspace\src\hg.mozilla.org\mozilla-central" resolved to "C:/Users/Barret/Workspace/src/hg.mozilla.org/mozilla-central" but we were unable to examine "c:\users\barret\workspace\src\hg.mozilla.org\mozilla-central" using strict case sensitive rules. Please check each component of the path and make sure that that path exactly matches the correct case of the files on your filesystem.
This wasn't happening 3 mo ago (not a useful timeframe, I know :)), but it happened after I came back and before I upgraded to the latest mozilla-build
Assignee | ||
Comment 1•2 years ago
|
||
I've done some investigation and one of the errors stems from Mach's FinderHook
This sets the relative path for imports to a normcase'd (i.e., lowercase path) so later on when we get to push.py
as part of ./mach try
, __file__
is lowercased up until the mozilla-central repo root, and so the resulting hg repo path will be all lowercase, resulting in the path mismatch error.
This doesn't resolve all the errors, but it removes at least one error message (of 6+)
Assignee | ||
Comment 2•2 years ago
|
||
Upon further investigation, the mach.pth
file in the virtualenv has all lowercase paths starting from topsrcdir. This line calling normcase() causes the bug. Removing the call to normcase() fixes the issue for me.
Comment 3•2 years ago
|
||
(In reply to Barret Rennie [:barret] (they/them) from comment #2)
Upon further investigation, the
mach.pth
file in the virtualenv has all lowercase paths starting from topsrcdir. This line calling normcase() causes the bug. Removing the call to normcase() fixes the issue for me.
Nice work. Sounds like something that would be fixed by bug 1740564 eventually. Looking at the annotate that function was added in November, so within your 3-month window. :)
The author of that function is Mitch, so moving NI to him.
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
I'm going to dogfood this patch for the foreseeable future and see if anything breaks.
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
If watchman is invoked (as part of hg's fsmonitor) with a path whose case does
not match the on-disk case (e.g., for case-insensitive file systems like NTFS),
it will get angry and throw a RootResolveError (although it will still work).
When doing ./mach try
, we end up invoking watchman several times which leads
to it getting very angry and throwing lots of errors.
This is all due to how we compute virtualenv paths -- by normcase()-ing them in
mach.pth
-- which results in push.py
having a lowercase path even if your
mozilla-central checkout has a non-lowercase on-disk path.
Calling Path.resolve() on the resulting path returns it to its on-disk
representation and no longer angers watchman.
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4fb626cd243a Don't anger watchman r=mhentges
Comment 7•2 years ago
|
||
bugherder |
Description
•