Review Request 122388: Custom Build System human readable defines and include search path for KDevelop 4.7

Salamander Purake salamanderrake at gmail.com
Sun Feb 8 21:14:23 UTC 2015



> On Feb. 3, 2015, 9:32 a.m., Sergey Kalinichev wrote:
> > First of all why? Why do you need it? We already have the GUI for that: project->setting->custom defines and includes. 
> > If you want to edit includes/defines without opening a project there is a kdev_includepathsconverter tool. If you find that it misses some functionality, feel free to add it there.
> 
> Milian Wolff wrote:
>     This allows us to remove the converter tool. This format is simple and gets the job done. All our config files should be plain text.
> 
> Sergey Kalinichev wrote:
>     >This format is simple 
>     
>     I don't know. It's not as simple as: one line - one include. Therefore it's much easier to make an error while editing. 
>     And I think that was the main reason why such format was chosen in the first place.
>     
>     >remove the converter tool
>     
>     With the convert tool it's easy to remove/rename/add some include paths from/to all/some entries. And the result is 100% correct, what can't be said about error-prone editing of the config file.
>     
>     E.g. with this patch include directories'll be stored like: 
>     
>     [CustomDefinesAndIncludes][ProjectPath2]
>     Path=.
>     
>     ...
>     
>     [CustomDefinesAndIncludes][ProjectPath2][Includes]
>     1 bar.h
>     2 foo.h
>     
>     ...
>     
>     [CustomDefinesAndIncludes][ProjectPath2][Defines]
>     ....
>     
>     Now consider adding a new entry: you have to keep project paths numeration, you must remember that ProjectPath2 represents the root path and use relative paths for the Path entry, also it's not obvious that "." is actually the project root item. 
>     
>     I think that it's cumbersome and error-prone therefore the converter tool still makes sense IMO.

|   I don't know. It's not as simple as: one line - one include. Therefore it's much easier to make an error while editing.
|   And I think that was the main reason why such format was chosen in the first place.

I don't know how a severly inefficient one line with cryptic extra chars that causes issues when you try to open it up in a text editor is easier? Not to mention that every include path is 4 times as big in the file then it would be with it being written out in plain english. The reason I am doing this is because its easy to generate and there is more to to programming in an ide then with just small projects with only one member in the team. As far as that format being chosen in the first place makes no sense, seems more like someone thought it would be cool to store data in a qbyte then actually thinking of anything functional, would have been better making the whole file a xml file. 

|    also it's not obvious that "." is actually the project root item. 

This is part of the original plugin and has nothing to do with my patch, and with the original unpatched plugin you still have the same issues with . being the root path of the project or being a typo or pointing to root '/' its self.


- Salamander


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


On Feb. 2, 2015, 10:11 p.m., Salamander Purake wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122388/
> -----------------------------------------------------------
> 
> (Updated Feb. 2, 2015, 10:11 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> Made the defines and include path lists human readable by removing the QDataStream and QByte types from the save load steps.
> 
> 
> Diffs
> -----
> 
>   languages/plugins/custom-definesandincludes/compilerprovider/settingsmanager.cpp bcdebe5 
> 
> Diff: https://git.reviewboard.kde.org/r/122388/diff/
> 
> 
> Testing
> -------
> 
> create/load a custom build system project (${project-name}.kdev4) add defines and includes path to project via in the text file and the dialog. Tested the defines lines inside the source code files and the autocompletion also in the code files.
> 
> 
> Thanks,
> 
> Salamander Purake
> 
>

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


More information about the KDevelop-devel mailing list