Kdevelop modifies files - even excluded files!

Milian Wolff mail at milianw.de
Tue Mar 1 13:40:59 GMT 2016


On Tuesday, March 1, 2016 9:19:30 AM CET Erik Rull wrote:
> Hi all,
> 
> this seems to be a bug:

Yes, please make sure to report it on our bug tracker at bugs.kde.org.
 
> My project is up to date and make tells me that there is nothing todo.
> Then I start kdevelop and let the background parser do his work.
> Then I just call make on the command line and get errors because files are
> changed and now corrupted that should not be changed.
> I have some more or less ancient .d files that tell make further
> dependencies on what to do and they get modified by kdevelop!
> 
> Why? And how can I stop that?

Very good question :) First things first:

a) what version of KDevelop are you using?
b) what project manager are you using? Custom Make? Assuming the latter, then
c) I have the gut feeling that our makefileresolver.cpp code is to blame. Try 
disabling it by returning early before m_resolver->resolveIncludePath is used 
in custommakemanager.cpp.

> The modification is really bad, the file gets corrupted and causes
> recompiles at positions that were actually not really modified by me. Even
> worse: The files are corrupted in a way that the compiler stops with an
> error!

Yes, I agree. Just note that we do not write to these files directly. Probably 
it's some external tool that we invoke which triggers the writes. Just as bad, 
but wanted to mention this to give a perspective.

> Example of a "good" file before kdevelop was started:
> common/ArgumentList.o common/ArgumentList.d : common/ArgumentList.cpp
> common/ArgumentList.h \
>  common/STL.h common/Tools.h common/Thread.h common/Time.h common/Log.h \
>  common/XWare.h
> 
> And after the modification:
> common/ArgumentList.o common/ArgumentList.d : common/ArgumentList.cpp
> common/ArgumentList.h \
>  common/STL.h common/Tools.h common/Thread.h common/Time.h common/Log.h \
>  common/XWare.h
> ommon/Log.h \
>  common/XWare.h
> 
> Please let me know how to stop that. Kdevelop 3.5 never showed that issue.
> 
> When kdevelop is running and I cleaned up the bad files and recreated them
> then everything is fine until the next kdevelop (re-)start.
> I explicitly excluded *.d in the Kdevelop project pattern configuration.

Excluding these files probably doesn't matter, see above.

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de



More information about the KDevelop mailing list