https://bugs.kde.org/show_bug.cgi?id=523168
Bug ID: 523168
Summary: Includes path order is not preserved
Classification: Applications
Product: kdevelop
Version First git master
Reported In:
Platform: Arch Linux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Language Support: CPP (Clang-based)
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
DESCRIPTION
Order of includes paths configured in "Language support" is not preserved.
STEPS TO REPRODUCE
1. Open the project configuration: "Open configuration"
2. In "Language support" add 10 entries
3. Save the configuration, and close the window.
4. Open again the "Language support" settings: The order of the 10th entry is
now on the 2nd line
OBSERVED RESULT
In the GUI the order of the 10th entry is now on the 2nd line in the "Language
support" settings.
Also in .kdev4/myproject.kdev4 the
"[CustomDefinesAndIncludes][ProjectPath0][Includes]" contains a dictionary,
which key is the order (a number) and the value is the include path.
The 10th entry is at the second line (with key 10), which should not be an
issue, but it looks like the key is not used.
Indeed it looks like the order that clang use is the one that is displayed in
the GUI, without taking into account the key in the settings.
EXPECTED RESULT
Include path order should be preserved.
In my case I have the following include path list:
```
/usr/lib/modules/7.1.3-arch1-3/build/arch/x86/include
/usr/lib/modules/7.1.3-arch1-3/build/include/generated/uapi
/usr/lib/modules/7.1.3-arch1-3/build/include/linux/compiler-version.h
/usr/lib/modules/7.1.3-arch1-3/build/include/linux/kconfig.h
/usr/lib/modules/7.1.3-arch1-3/build/include/linux/compiler_types.h
/usr/lib/modules/7.1.3-arch1-3/build/arch/x86/include/generated
/usr/lib/modules/7.1.3-arch1-3/build/include
/usr/lib/modules/7.1.3-arch1-3/build/arch/x86/include/uapi
/usr/lib/modules/7.1.3-arch1-3/build/arch/x86/include/generated/uapi
/usr/lib/modules/7.1.3-arch1-3/build/include/uapi
```
Which is an issue, since `/usr/lib/modules/7.1.3-arch1-3/build/include/uapi` is
reordered in second place. Indeed it is before
`/usr/lib/modules/7.1.3-arch1-3/build/include` which is a big issue when
including <linux/types.h> since the wrong file is loaded by clang for syntax
highlighting.
SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.7.2
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Kernel Version: 7.1.3-arch1-3 (64-bit)
Graphics Platform: Wayland
Processors: 22 × Intel® Core™ Ultra 7 155H
Memory: 64 Gio of RAM (62.3 Gio usable)
Graphics Processor: Intel® Arc
--
You are receiving this mail because:
You are watching all bug changes.