<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/121757/">https://git.reviewboard.kde.org/r/121757/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDevelop, Kevin Funk and Milian Wolff.</div>
<div>By Olivier Jean de Gaalon.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdev-clang
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Note: this currently does nothing useful, since none of the managers actually create target items. </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The problem I'm running into right now is that kdev-clang will get only the base system includes for all headers in the (cmake) project. This is correct from the build manager's perspective: include paths are for targets. This is completely broken for kdev-clang of course.<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
If we accept that reasoning, kdev-clang needs to prefer the target environment when it becomes available, so that the headers are rebuilt with the correct includes+defines when requested from the target. That's what this patch purports to do (in theory). </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This could maybe instead use an enum to prefer project over no-project and target over all. </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Objections:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
1. If I create a new header in the project, I still won't get project includes
2. This is really just a hack over the hack of building ASTs for non-targets in the first place
2.1 but obviously any solution to said hack needs to allow auto-force-duchaining of non-targets for orphan files, because we like that feature</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Any other thoughts or ideas?</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Tests fail in the same manner as before</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>clangparsejob.cpp <span style="color: grey">(297b836)</span></li>
<li>duchain/clangparsingenvironment.h <span style="color: grey">(7bb8111)</span></li>
<li>duchain/clangparsingenvironment.cpp <span style="color: grey">(1decc14)</span></li>
<li>duchain/clangparsingenvironmentfile.h <span style="color: grey">(953ee94)</span></li>
<li>duchain/clangparsingenvironmentfile.cpp <span style="color: grey">(b3d0563)</span></li>
<li>tests/test_duchain.cpp <span style="color: grey">(7db9fea)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/121757/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>