[Libreoffice-bugs] [Bug 117918] New: UNO API: headers including themselves, causes IWYU assertion
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed May 30 21:26:05 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=117918
Bug ID: 117918
Summary: UNO API: headers including themselves, causes IWYU
assertion
Product: LibreOffice
Version: 6.2.0.0.alpha0+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: framework
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: kelemeng at ubuntu.com
CC: vmiklos at collabora.co.uk
Created attachment 142423
--> https://bugs.documentfoundation.org/attachment.cgi?id=142423&action=edit
Diff between a fresh and a fixed up UnoApiHeadersTarget dir, showing
problematic files
While trying to help on bug #42949 I noticed that IWYU does not report
unnecessary headers for some larger files with a lot of includes.
A bit of investigation revealed that IWYU fails in such situations with an
assertion error, like this:
$ include-what-you-use -Wall -DBOOST_ERROR_CODE_HEADER_ONLY
-DBOOST_SYSTEM_NO_DEPRECATED -DCPPU_ENV=gcc3 -DLINUX -DOSL_DEBUG_LEVEL=1
-DSAL_LOG_INFO -DSAL_LOG_WARN -DUNIX -DUNX -DX86_64 -D_PTHREADS -D_REENTRANT
-DSD_DLLIMPLEMENTATION -DSDUI_DLL_NAME=\"libsduilo.so\" -DENABLE_SDREMOTE
-DENABLE_SDREMOTE_BLUETOOTH -DLIBO_INTERNAL_ONLY
-I/home/gabor/src/core/workdir/UnpackedTarball/icu/source
-I/home/gabor/src/core/workdir/UnpackedTarball/icu/source/i18n
-I/home/gabor/src/core/workdir/UnpackedTarball/icu/source/common
-I/home/gabor/src/core/external/boost/include
-I/home/gabor/src/core/workdir/UnpackedTarball/boost
-I/home/gabor/src/core/external/bluez_bluetooth/inc
-I/home/gabor/src/core/include -I/usr/lib/jvm/java-11-openjdk-amd64/include
-I/usr/lib/jvm/java-11-openjdk-amd64/include/linux
-I/home/gabor/src/core/config_host -I/home/gabor/src/core/sd/inc
-I/home/gabor/src/core/sd/source/ui/inc
-I/home/gabor/src/core/sd/source/ui/slidesorter/inc
-I/home/gabor/src/core/workdir/SdiTarget/sd/sdi
-I/home/gabor/src/core/workdir/CustomTarget/officecfg/registry
-I/home/gabor/src/core/workdir/UnoApiHeadersTarget/udkapi/normal
-I/home/gabor/src/core/workdir/UnoApiHeadersTarget/offapi/normal
-I/home/gabor/src/core/workdir/UnpackedTarball/libxml2/include -isystem
/usr/include/dbus-1.0 -isystem /usr/lib/x86_64-linux-gnu/dbus-1.0/include
-isystem /usr/include/glib-2.0 -isystem
/usr/lib/x86_64-linux-gnu/glib-2.0/include -finput-charset=UTF-8
-fmessage-length=0 -fno-common -pipe -fvisibility-inlines-hidden -fPIC
-std=c++11 -c -x c++ /home/gabor/src/core/sd/inc/AnnotationEnumeration.hxx
Cycle in include-mapping:
"com/sun/star/text/XTextRange.hpp" ->
"com/sun/star/text/XTextRange.hpp"
/build/iwyu-mhPUyW/iwyu-5.0/iwyu_include_picker.cc:845: Assertion failed: Cycle
in include-mapping
Looking at
workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/text/XTextRange.hpp the
problem is clear: it contains an include of itself:
#include "com/sun/star/text/XTextRange.hpp"
Commenting this line out causes the assertion error to disappear. That is,
until it hits a similar problem - so far, to get IWYU to run on sd/inc and
chart2/inc needed commenting out 17 self includes.
I think it would be helpful to fix the underlying problem on the LO side and
stop generating hpp files with includes to themselves.
That way IWYU and the find-unneeded-includes script could give relevant results
about all the headers.
I'm using:
include-what-you-use 0.9 based on clang version 5.0.1-2
(tags/RELEASE_501/final)
on Ubuntu 18.04.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180530/b7c5e84a/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list