-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Build
-
Labels:None
-
Service Arch
-
ALL
It looks like the `errorcodes.py` script is checking for error codes in all source files, including unit-tests. This makes it difficult to ensure in tests whether a specific error code is returned by a function. For example a test, which looks like this:
ASSERT_EQ(ErrorCodes::Error(50993), decision.getAbortStatus()->code());
Fails to compile with this error:
[1/3] Checking error codes and waiting for next compile to finish FAILED: build/compiler_timestamps/error_code_check.timestamp cmd /c C:\Python37\python.exe buildscripts/errorcodes.py -q --list-files && ( echo "" > build\compiler_time DUPLICATE IDS: 50993 src/mongo/db/s/transaction_coordinator_test.cpp:469:33:ErrorCodes::Error(50993 src/mongo/db/s/transaction_coordinator_util.cpp:551:66:ErrorCodes::Error(50993 ok: False next: 51244 ERRORS DETECTED. To correct, run "buildscripts/errorcodes.py --fix" to replace zero codes. Other errors require manual correction.