New issue
Advanced search Search tips

Issue 838890 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 839389

Blocking:
issue 834164


Participants' hotlists:
Hotlist-Bindings-IDLCompiler


Sign in to add a comment

build error when using union type which have set of typedef value.

Project Member Reported by hs1217....@samsung.com, May 2 2018

Issue description

build error when using union type which have set of typedef value.

https://chromium-review.googlesource.com/c/chromium/src/+/1034618/4/third_party/blink/renderer/core/css/cssom/cssom_string.idl

https://chromium-review.googlesource.com/c/chromium/src/+/1034618/4/third_party/blink/renderer/core/css/cssom/css_unparsed_value.idl#19

FAILED: obj/third_party/blink/renderer/bindings/core/v8/bindings_core_impl/v8_css_variable_reference_value.o 
/b/swarming/w/ir/cache/goma_client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/blink/renderer/bindings/core/v8/bindings_core_impl/v8_css_variable_reference_value.o.d -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"330570-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=329375 -DCR_LIBCXXABI_REVISION=329629 -DCR_SYSROOT_HASH=4e7db513b0faeea8fb410f70c9909e8736f5c0ab -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBLINK_CORE_IMPLEMENTATION=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DWEBP_EXTERN=extern -DANGLE_ENABLE_RELEASE_ASSERTS -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DENABLE_IPC_FUZZER -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_USE_SKCMS -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DWTF_USE_WEBAUDIO_FFMPEG=1 -DWTF_USE_DEFAULT_RENDER_THEME=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DUSE_LIBJPEG_TURBO=1 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DGTEST_RELATIVE_PATH -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DNO_MAIN_THREAD_WRAPPING -DLIBXSLT_STATIC -I../.. -Igen -I../../third_party/blink/renderer -I../../third_party/blink -Igen/third_party/blink/renderer -Igen/third_party/blink -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -I../../third_party/blink/renderer -Igen/third_party/blink/renderer -I../../third_party/protobuf/src -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/boringssl/src/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/third_party/skcms -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/angle/include -I../../third_party/angle/src/common/third_party/base -Igen/angle -I../../third_party/libwebm/source -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libjpeg_turbo -I../../third_party/blink -Igen/third_party/blink -I../../v8/include -Igen/v8/include -I../../third_party/webrtc_overrides -I../../third_party/webrtc -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/ots/include -I../../v8/include -Igen/v8/include -I../../third_party/libxml/src/include -I../../third_party/libxml/linux/include -I../../third_party/libxslt/src -I../../third_party/snappy/src -I../../third_party/snappy/linux -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -Xclang -mllvm -Xclang -fast-isel-sink-local-values=1 -fdebug-prefix-map=/b/swarming/w/ir/cache/builder/src/out/Release=. -no-canonical-prefixes -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-thirdparty-webkit -Xclang -plugin-arg-find-bad-constructs -Xclang check-enum-max-value -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.so -Xclang -add-plugin -Xclang blink-gc-plugin -Wglobal-constructors -g0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/glib-2.0 -isystem../../build/linux/debian_sid_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wno-header-guard -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/nss -isystem../../build/linux/debian_sid_amd64-sysroot/usr/include/nspr -DLIBXML_STATIC= -std=gnu++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/debian_sid_amd64-sysroot -fvisibility-inlines-hidden -c gen/third_party/blink/renderer/bindings/core/v8/v8_css_variable_reference_value.cc -o obj/third_party/blink/renderer/bindings/core/v8/bindings_core_impl/v8_css_variable_reference_value.o
In file included from gen/third_party/blink/renderer/bindings/core/v8/v8_css_variable_reference_value.cc:17:
gen/third_party/blink/renderer/bindings/core/v8/v8_css_unparsed_value.h:14:10: fatal error: 'bindings/core/v8/cssom_string_or_css_variable_reference_value.h' file not found
#include "bindings/core/v8/cssom_string_or_css_variable_reference_value.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
 
Description: Show this description
when i check what file generated, actually union type was auto-generated as "third_party/blink/renderer/bindings/core/v8/string_or_css_variable_reference_value.cc"

so i think path of header file should change or auto-gen file path should change.
Cc: peria@chromium.org
@peria
could you check this issue? thank you.
do you think this issue is complicated?
if it were not, if you give a some guide, i will take this issue.

Cc: bashi@chromium.org
At the risk of sounding too obvious, it looks like we're resolving typedefs before determining a union's name.

The spec says in https://heycam.github.io/webidl/#idl-union that "The type name of a union type is formed by taking the type names of each member type, in order, and joining them with the string "Or".", and https://heycam.github.io/webidl/#idl-typedefs says "This new name is not exposed by language bindings; it is purely used as a shorthand for referencing the type in the IDL.", so one could argue the current behavior is not really wrong.

In fact, if we didn't resolve the typedefs beforehand, an IDL excerpt like

    typedef long foo;
    ...
    (foo or DOMString)
    (long or DOMString)

we'd end up with foo_or_string.{cc,h} and long_or_string.{cc,h} doing exactly the same things, right?
Blocking: 834164

Comment 6 by bashi@chromium.org, May 6 2018

Yeah, this is an intended behavior. I agree that this is a bit confusing though.

I'd prefer preserving the current behavior, but I'll defer to peria@ and yukishiino@ whether we should use typedef instead of resolved types.

Comment 7 by peria@chromium.org, May 7 2018

Owner: peria@chromium.org
Status: Assigned (was: Untriaged)
For generated files' names, #4 and #6 are correct, but I guess the root cause of this issue is whether we resolve typedefs (in union?) in generating #include lines, while we do it in generating files.

Comment 8 by peria@chromium.org, May 7 2018

FYI: This issue is caused in
https://cs.chromium.org/chromium/src/third_party/blink/renderer/bindings/scripts/code_generator_v8.py?l=120-125

I guess this method does not need to handle include files, and instead updated idl_types should do in their .add_includes_for_type (https://cs.chromium.org/chromium/src/third_party/blink/renderer/bindings/scripts/v8_types.py?l=476-478 for union types).

Comment 9 by peria@chromium.org, May 7 2018

Blockedon: 839389

Comment 10 by peria@chromium.org, May 25 2018

Labels: Hotlist-Bindings-IDLCompiler

Sign in to add a comment