<table><tr><td style="">rjvbb created this revision.<br />rjvbb added a reviewer: KDevelop.<br />rjvbb added a project: KDevelop.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7952" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This is a spin-off of <a href="https://phabricator.kde.org/D7930" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D7930</a>, intended to investigate the idea of working with canonical path representations throughout KDevelop.</p>

<p>The patch achieves this by converting paths to their canonical representation on input, currently without opt-in/out and probably not in the most efficient way.</p>

<p>It works on paths only; symlinks to files are left untouched.</p>

<p>This patch indeed makes the one from <a href="https://phabricator.kde.org/D7930" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D7930</a> superfluous for me. For me it also triggers an apparently known issue that where the parser gets confused including the proper "debug.h" headers, leading to errors like <tt style="background: #ebebeb; font-size: 13px;">Use of undeclared identifier 'CMAKE'</tt>.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>the test_path unittest succeeds but would probably need to check the result of canonicalisation.</p>

<p>At least 2 places that could be optimised:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">the concatenation of the canonicalised file path and the file name in <tt style="background: #ebebeb; font-size: 13px;">toCanonicalPath()</tt></li>
<li class="remarkup-list-item">the canonicalisation of the result of a concatenation in <tt style="background: #ebebeb; font-size: 13px;">Path::addPath()</tt>.</li>
</ul>

<p>In theory there should be no need to make this feature optional; the patch emulates what happens at the OS level on Mac. One could consider providing a more or less visible option for advanced users to deactivate the feature if it breaks anything for them (or for optimal performance in contexts where canonicalisation is not required).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7952" rel="noreferrer">https://phabricator.kde.org/D7952</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kdevplatform/util/path.cpp</div></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop<br /><strong>Cc: </strong>kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>