check_spidermonkey_style.py fails
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: saschanaz, Unassigned)
References
(Regression)
Details
(Keywords: regression)
2:58.48 ipc/app/plugin-container.exe
2:58.48 js/xpconnect/shell/xpcshell.exe
2:58.98 ./spidermonkey_checks.stub
2:59.06 ./dependentlibs.list.stub
3:02.05 --- check_spidermonkey_style.py expected output
3:02.05 +++ check_spidermonkey_style.py actual output
3:02.05 @@ -1,3 +1,6 @@
3:02.05 +js/src/jit/none/Assembler-none.h:13:20: error:
3:02.05 + "jit/RegisterSets.h" should be included after "jit/none/Architecture-none.h"
3:02.05 +
3:02.05 js/src/tests/style/BadIncludes.h:3: error:
3:02.05 the file includes itself
3:02.05 TEST-UNEXPECTED-FAIL | check_spidermonkey_style.py | actual output does not match expected output; diff is above.
3:02.05 TEST-UNEXPECTED-FAIL | check_spidermonkey_style.py | Hint: If the problem is that you renamed a header, and many #includes are no longer in alphabetical order, commit your work and then try `check_spidermonkey_style.py --fixup`. You need to commit first because --fixup modifies your files in place.
3:02.05 Traceback (most recent call last):
3:02.05 File "c:\Users\sasch\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
3:02.05 return _run_code(code, main_globals, None,
3:02.05 File "c:\Users\sasch\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
3:02.05 exec(code, run_globals)
3:02.05 File "C:\Users\sasch\Documents\GitHub\gecko-dev\python\mozbuild\mozbuild\action\file_generate.py", line 156, in <module>
3:02.05 sys.exit(log_build_task(main, sys.argv[1:]))
3:02.06 File "C:\Users\sasch\Documents\GitHub\gecko-dev\python\mozbuild\mozbuild\action\util.py", line 18, in log_build_task
3:02.06 return f(*args, **kwargs)
3:02.06 File "C:\Users\sasch\Documents\GitHub\gecko-dev\python\mozbuild\mozbuild\action\file_generate.py", line 100, in main
3:02.06 ret = module.__dict__[method](
3:02.06 File "C:/Users/sasch/Documents/GitHub/gecko-dev/config/run_spidermonkey_checks.py", line 15, in main
3:02.06 raise Exception(script + " failed")
3:02.06 Exception: C:/Users/sasch/Documents/GitHub/gecko-dev/config/check_spidermonkey_style.py failed
3:02.07 mozmake[3]: *** [backend.mk:148: js/src/build/.deps/spidermonkey_checks.stub] Error 1
3:02.07 mozmake[3]: *** Waiting for unfinished jobs....
3:03.21 mozmake[2]: *** [C:/Users/sasch/Documents/GitHub/gecko-dev/config/recurse.mk:34: misc] Error 2
3:03.21 mozmake[1]: *** [C:/Users/sasch/Documents/GitHub/gecko-dev/config/rules.mk:358: default] Error 2
3:03.22 mozmake: *** [client.mk:65: build] Error 2
3:03.27 256 compiler warnings present.
mach clobber
does not fix it, not sure why this suddenly happens.
Reporter | ||
Comment 1•4 years ago
|
||
Bisecting says https://phabricator.services.mozilla.com/D122592 is the culprit.
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Comment 2•4 years ago
|
||
This is really strange. The python script wants us to include "jit/RegisterSets.h" after "jit/none/Architecture-none.h", even though that's already the include order in that file. I can't reproduce the failure on Linux (tested with Python 3.8.3 and 3.9.6) and neither does the script fail on CI. (I've explicitly tested Python 3.9.6, because that version was also released yesterday.)
Can you apply the following diff and then run python config/check_spidermonkey_style.py
? The output should contain a section for "file: js/src/jit/none/Assembler-none.h" which should help to pinpoint the exact failure. Thanks!
diff --git a/config/check_spidermonkey_style.py b/config/check_spidermonkey_style.py
--- a/config/check_spidermonkey_style.py
+++ b/config/check_spidermonkey_style.py
@@ -757,6 +757,11 @@ def check_file(
(section1 == section2)
and (include1.inclname.lower() > include2.inclname.lower())
):
+ print(f"file: {filename}")
+ print(f"\tsection1: {section1}")
+ print(f"\tsection2: {section2}")
+ print(f"\tinclude1 ({include1.inclname}): {include1.inclname.lower()}")
+ print(f"\tinclude2 ({include2.inclname}): {include2.inclname.lower()}")
error(
filename,
str(include1.linenum) + ":" + str(include2.linenum),
Reporter | ||
Comment 3•4 years ago
|
||
Hi, that gives:
3:52.62 file: js/src/jit/none/Assembler-none.h
3:52.62 section1: 4
3:52.62 section2: 4
3:52.62 include1 (jit/RegisterSets.h): jit/registersets.h
3:52.62 include2 (jit/none/Architecture-none.h): jit/none/architecture-none.h
3:52.73 file: js/src/tests/style/BadIncludesOrder-inl.h
3:52.73 section1: 6
3:52.73 section2: 6
3:52.73 include1 (vm/JSScript-inl.h): vm/jsscript-inl.h
3:52.73 include2 (vm/Interpreter-inl.h): vm/interpreter-inl.h
3:52.73 file: js/src/tests/style/BadIncludesOrder-inl.h
3:52.73 section1: 6
3:52.73 section2: 4
3:52.73 include1 (vm/Interpreter-inl.h): vm/interpreter-inl.h
3:52.73 include2 (js/Value.h): js/value.h
3:52.73 file: js/src/tests/style/BadIncludesOrder-inl.h
3:52.73 section1: 4
3:52.73 section2: 4
3:52.73 include1 (js/Value.h): js/value.h
3:52.73 include2 (ds/LifoAlloc.h): ds/lifoalloc.h
3:52.73 file: js/src/tests/style/BadIncludesOrder-inl.h
3:52.73 section1: 4
3:52.73 section2: 3
3:52.73 include1 (ds/LifoAlloc.h): ds/lifoalloc.h
3:52.73 include2 (jsapi.h): jsapi.h
3:52.73 file: js/src/tests/style/BadIncludesOrder-inl.h
3:52.73 section1: 3
3:52.73 section2: 2
3:52.73 include1 (jsapi.h): jsapi.h
3:52.73 include2 (stdio.h): stdio.h
3:52.73 file: js/src/tests/style/BadIncludesOrder-inl.h
3:52.73 section1: 2
3:52.73 section2: 1
3:52.73 include1 (stdio.h): stdio.h
3:52.73 include2 (mozilla/HashFunctions.h): mozilla/hashfunctions.h
3:52.73 file: js/src/tests/style/BadIncludesOrder-inl.h
3:52.73 section1: 4
3:52.73 section2: 4
3:52.73 include1 (vm/JSScript.h): vm/jsscript.h
3:52.73 include2 (vm/JSFunction.h): vm/jsfunction.h
3:52.93 --- check_spidermonkey_style.py expected output
3:52.93 +++ check_spidermonkey_style.py actual output
3:52.93 @@ -1,3 +1,6 @@
3:52.93 +js/src/jit/none/Assembler-none.h:13:20: error:
3:52.93 + "jit/RegisterSets.h" should be included after "jit/none/Architecture-none.h"
3:52.93 +
3:52.93 js/src/tests/style/BadIncludes.h:3: error:
3:52.93 the file includes itself
3:52.93 TEST-UNEXPECTED-FAIL | check_spidermonkey_style.py | actual output does not match expected output; diff is above.
3:52.93 TEST-UNEXPECTED-FAIL | check_spidermonkey_style.py | Hint: If the problem is that you renamed a header, and many #includes are no longer in alphabetical order, commit your work and then try `check_spidermonkey_style.py --fixup`. You need to commit first because --fixup modifies your files in place.
Reporter | ||
Comment 4•4 years ago
|
||
Oh wait, it seems what broken was my git clone. Filed https://github.com/glandium/git-cinnabar/issues/280 instead.
I guess your patch is okay, sorry for causing confusion 😬
Comment 5•4 years ago
|
||
Ah, that sounds more plausible! Good to hear that there isn't something working incorrectly in "check_spidermonkey_style.py".
Reporter | ||
Comment 6•4 years ago
|
||
git cinnabar reclone
fixed it. Sorry again.
Description
•