Review Request 120085: Use only file extension to determine file type.

Milian Wolff mail at milianw.de
Sun Sep 7 09:01:49 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120085/#review65954
-----------------------------------------------------------


Ugh I saw this happening as well at one point and was wondering whats going on. good find.

But I think the proper solution instead is to make the CMake plugin properly report the file extensions. Why is this not working? The loop before should already match CMakeLists.txt <-> CMake and the C++ plugin should never see the CMakeLists.txt. If that is not the case, we must find a way to better prioritize the cached data.

Otherwise this might break people's workflow when suddenly the mimetypes are not properly recognized anymore. Hm.

- Milian Wolff


On Sept. 7, 2014, 8:51 a.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120085/
> -----------------------------------------------------------
> 
> (Updated Sept. 7, 2014, 8:51 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
>  Real project example:
> someFile.txt begins with `/*`
> it considered as c++ file by KMimeType::findByUrl(url).
> Then we do: d->fileExtensionCache.insert(extension, languages); So now we think that c++ support can parse txt files.
>  Then there is a CMakeLists.txt file that is already parsed by cmake language support, but on project opening (or when opening it in the editor) we try to parse it again and see that it extension is `*.txt` and we already registered txt files as supported by c++ language support, so this file is being parsed by c++ language support, but as it already has context created by cmake support and we assume that it's created by us -> crash
> 
> 
> Diffs
> -----
> 
>   shell/languagecontroller.cpp 817c1ce 
> 
> Diff: https://git.reviewboard.kde.org/r/120085/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140907/c17b3d3e/attachment.html>


More information about the KDevelop-devel mailing list