Open Bug 1764463 Opened 2 years ago Updated 1 year ago

Mozillabuild 4.0 broke gvim external command support for hg diff

Categories

(Firefox Build System :: MozillaBuild, defect, P5)

Desktop
All
defect

Tracking

(Not tracked)

People

(Reporter: Gijs, Unassigned)

Details

STR:

  1. mozillabuild 4.0
  2. vim 8.2 for windows from the developers' website (ensure it's on $PATH before mozillabuild stuff)
  3. vimrc set to set fileformats=unix,dos (in case that matters)
  4. open any mozilla-central file from a mozillabuild shell, using gvim path/to/file from the root of the repo
  5. in vim run :! hg diff %

ER:
you get a diff in a console window

AR:

C:\mozilla-build\msys2\usr\bin\bash.exe -c "hg diff tools/moztreedocs/mach_commands.py"
/usr/bin/bash: /c/mozilla-build/python3/Scripts/hg: c:\mozillabuild-stage\mozilla-build\python3\python.exe^M: bad interpreter: No such file or directory
shell returned 126
Hit any key to close this window...

I don't really know what specifically is breaking this; the weird windows line ends (the ^M) or the non-existent strange mozillabuild-stage path (what is that?), or the mixed use of forward and backward slashes could all be at fault.

I don't know what else this effects, and if e.g. the issue is limited to hg commands and/or use from vim, or is more widespread. hg use direct from the mozillabuild commandline seems fine.

Interesting, can you try the workaround described in this related bug?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #1)

Interesting, can you try the workaround described in this related bug?

Apologies for the slow response, I went on PTO.

The workaround doesn't seem to fix things, though it changes the error message - I now just get "shell returned 255" .

I'll also note that after applying that workaround (also from gvim...), gvim hiccups:

"/mozilla-build/python3/Scripts/hg" [unix] 61L, 1812B written
syntastic: error: checker output:
Traceback (most recent call last):
  File "C:\Users\[something]\vimfiles\bundle\syntastic\syntax_checkers\python\compile.py", line 11, in <module>
    compile(open(argv[1]).read(), argv[1], 'exec', 0, 1)
FileNotFoundError: [Errno 2] No such file or directory: 'C:/mozilla-build/msys2/mozilla-build/python3/Scripts/hg'

in case that's helpful...

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(mhentges)

Hey, I hope your PTO was good :)
Can you try the MozillaBuild 4.0.1 release, just to see if its upstream "shebang fix" improves your situation?

This path (C:/mozilla-build/msys2/mozilla-build/python3/Scripts/hg) is definitely weird, either way.

Flags: needinfo?(mhentges) → needinfo?(gijskruitbosch+bugs)

(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #3)

Hey, I hope your PTO was good :)
Can you try the MozillaBuild 4.0.1 release, just to see if its upstream "shebang fix" improves your situation?

Unfortunately that didn't improve things:

C:\mozilla-build\msys2\usr\bin\bash.exe -c " hg diff"
shell returned 255
Hit any key to close this window...
Flags: needinfo?(gijskruitbosch+bugs)
Product: Firefox Build System → Developer Infrastructure

The severity field is not set for this bug.
:andi, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bpostelnicu)
Component: Developer Environment Integration → Bootstrap Configuration
Flags: needinfo?(bpostelnicu)
Product: Developer Infrastructure → Firefox Build System
Component: Bootstrap Configuration → MozillaBuild
Product: Firefox Build System → mozilla.org
Version: Trunk → other
Product: mozilla.org → Firefox Build System

The severity field is not set for this bug.
:ahochheiden, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahochheiden)
Severity: -- → S4
Flags: needinfo?(ahochheiden)
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.