Running ui/gl/generate_bindings.py fails on collision between enum names |
|||
Issue description
Currently running the script produces this unhelpful error:
Traceback (most recent call last):
File "generate_bindings.py", line 3403, in <module>
sys.exit(main(sys.argv[1:]))
File "generate_bindings.py", line 3384, in main
GenerateEnumUtils(header_file, enum_header_filenames)
File "generate_bindings.py", line 3020, in GenerateEnumUtils
raise RunTimeError("code collision: %s and %s have the same code %s"
NameError: global name 'RunTimeError' is not defined
Fixing the naming of 'RunTimeError' -> 'RuntimeError' then gives:
Traceback (most recent call last):
File "generate_bindings.py", line 3403, in <module>
sys.exit(main(sys.argv[1:]))
File "generate_bindings.py", line 3384, in main
GenerateEnumUtils(header_file, enum_header_filenames)
File "generate_bindings.py", line 3021, in GenerateEnumUtils
% (dict[value], name, value))
RuntimeError: code collision: GL_CLOSE_PATH_NV and GL_CLOSE_PATH_CHROMIUM have the same code 0x00
These enums are the same but defined in separate headers. Unsure of how to resolve this conflict, and haven't found where it started breaking.
,
Jul 7 2017
,
Jul 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/43d64677dde45bbde789f77ecbba6687a54be850 commit 43d64677dde45bbde789f77ecbba6687a54be850 Author: Jamie Madill <jmadill@chromium.org> Date: Fri Jul 07 21:02:48 2017 Fix ui/gl/generate_bindings.py. This script had an incorrect exception (RunTimError -> RuntimeError) and also was erroring on an enum-to-string function check. Fix the naming of the exception error and allow for the same enum with a different suffix to pick the first one arbitrarily, since they should have the same value. This also regenerates the generated files which were not up-to-date. BUG= 740153 R=piman@chromium.org Change-Id: I2f6b982064bbedc8b7f4c12092ca1be5ea18e4df Reviewed-on: https://chromium-review.googlesource.com/563503 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Cr-Commit-Position: refs/heads/master@{#485045} [modify] https://crrev.com/43d64677dde45bbde789f77ecbba6687a54be850/ui/gl/generate_bindings.py [modify] https://crrev.com/43d64677dde45bbde789f77ecbba6687a54be850/ui/gl/gl_bindings_autogen_egl.cc [modify] https://crrev.com/43d64677dde45bbde789f77ecbba6687a54be850/ui/gl/gl_bindings_autogen_egl.h [modify] https://crrev.com/43d64677dde45bbde789f77ecbba6687a54be850/ui/gl/gl_enums_implementation_autogen.h
,
Jul 7 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jmad...@chromium.org
, Jul 7 2017