D5447: Only add auto-detected compilers to model if they actually exist

Milian Wolff noreply at phabricator.kde.org
Sun Mar 10 19:24:53 GMT 2019


mwolff added a comment.


  In D5447#404424 <https://phabricator.kde.org/D5447#404424>, @arrowd wrote:
  
  > In D5447#401247 <https://phabricator.kde.org/D5447#401247>, @mwolff wrote:
  >
  > > you are right, this code should essentially do `if (rt->findExecutable(compiler->path().isEmpty()) continue;`, could you introduce that please?
  >
  >
  > I got lost in this conversation. Let's break down all these checks.
  >
  > Old code:
  >
  > - absolutePath. Always `true` now, so can be dropped.
  
  
  It must not be absolute, the compiler must be looked up within the runtime! If we pass in an absolute path resolved on the local host, it will break the runtime integration.
  
  > - QFileInfo::exists(rt->pathInHost()). Should have the condition flipped. Should check if a given absolute path to the compiler exists inside a runtime.
  
  No, it should check if an executable of the given name exists in the runtime.
  
  > - QStandardPaths::findExecutable(). If I get it right, it should search for given executable name in runtime's PATH paths, but actually was searching in host filesystem.
  
  Yes, QStandardPaths obviously doesn't know anything about the kdevelop runtimes.
  
  > New code:
  > 
  > - No absolutePath.
  
  Yes.
  
  > - Fixed QFileInfo::exists(rt->pathInHost()). It now checks if given absolute path in the host also exists in the runtime.
  
  `rt->findExecutable(name)` which returns empty when no such executable is found
  
  > - QStandardPaths::findExecutable(). Still does something strange.
  
  Should be used by the default/local runtime internally
  
  > So, what's required to get this in? Fix `QStandardPaths::findExecutable()` to search inside runtime?
  
  No, expand the runtime API to add an `findExecutable` similar to the `pathInHost` API there, then use it here

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D5447

To: arrowd, mwolff, arichardson
Cc: skalinichev, apol, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190310/d1ce9221/attachment.html>


More information about the KDevelop-devel mailing list