Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

New UI: Project Globs

<< < (3/4) > >>

BlueHazzard:
I think you have not understood me:
MXCube (a project generator for ST Microcontroller) generates source files and a generic project file (i am not quite sure, but i think it has this format: https://www.keil.com/pack/doc/CMSIS/Build/html/element_cprj.html). This is not a makefile. This is also not a codeblocks project.

This is a commercial product and the code is not public or i have any possibility to intervene...
This code generates a lot sub folders with code, asambler and other files.
This code generator generates a generic project file where he describes some sub folders that have to be added to the build system, but it does not describe each file.
The structure of this folders changes a lot and is quite dynamic.

If i can not use globs with file system watcher i have to reimport the whole project each time. This is not acceptable. And other IDEs do this automatically. Why should codeblocks not do it?



--- Quote ---This is the job for the generator.
--- End quote ---
Well i can not modify the generator....


--- Quote ---Does this folder parsing works with multi-folder projects? Would you be able to use these globs with a projects as big as Codeblocks.cbp
--- End quote ---
yes.


--- Quote ---If this is the only reason for this feature to exists, I doubt that it is a good idea to add it.
--- End quote ---
This is a example of the usage.... Look at eclipse they use this concept for their projects....
here is a other user: http://forums.codeblocks.org/index.php/topic,22783.msg157016.html#msg157016


--- Quote ---If I were doing it I would monitor the original project definition for changes and just generate plain cbp files. It would be a lot simpler and easier to do. These FS watchers seem scary and inefficient to me and the OS differences are quite massive under the hood...
--- End quote ---
Well i would still need the fs watcher... If you do not use project globs you have absolute no impact (beside the 8 Bytes per project file for the ID)....

oBFusCATed:

--- Quote from: BlueHazzard on December 29, 2020, 04:37:11 pm ---I think you have not understood me:
MXCube (a project generator for ST Microcontroller) generates source files and a generic project file (i am not quite sure, but i think it has this format: https://www.keil.com/pack/doc/CMSIS/Build/html/element_cprj.html). This is not a makefile. This is also not a codeblocks project.

--- End quote ---
I know what it is. I don't know why people want to use it :)


--- Quote from: BlueHazzard on December 29, 2020, 04:37:11 pm ---If i can not use globs with file system watcher i have to reimport the whole project each time. This is not acceptable. And other IDEs do this automatically. Why should codeblocks not do it?

--- End quote ---
This is what cmake does - it generates a new project file every time.

Anyway. I have an opinion, but the decision is up to you.
If you find it useful then fine. Just keep in mind that you'll be the owner of this part of the code and you would have the responsibility to maintain it.

BlueHazzard:

--- Quote from: omlk on December 28, 2020, 07:43:51 pm ---I understood correctly?


--- End quote ---
No, the UI is in Project->Project Globs
There you can add Folders that are added automatically to the project.

omlk:

--- Quote from: BlueHazzard on December 29, 2020, 01:58:10 pm ---The initial idea was (and still is if i find the time) that you can use generated projects, like from STCube (Microcontroller)
They generate a "generic" makefile you can import in eclipse and i have written a codeblocks import too, but in this file the source files are not listed, only a top level folder is listed. You have to add the whole folder, and every time you regenerate the code you would have to reimport the whole folder and remove the non existent files. Eclipse does this by default.
With this function this would happen automatically also in codeblocks.

PS. This was 3 years ago, i do not know if they have updated their project export file to the standard (https://www.keil.com/pack/doc/CMSIS/Build/html/element_cprj.html ) where each file is listed...

--- End quote ---
+ :) Now I understand what you offered.

killerbot:

--- Quote from: oBFusCATed on December 29, 2020, 09:41:24 am ---BTW:
What is the sales pitch for these globs?
Why would you want to introduce such a complex system?

At work we've used them in cmake and they are a total disaster, so we're slowly replacing them with hard-coded list of files.

--- End quote ---

We are doing the  same thing, moving away from globs in cmake. But we used to glob in cmake, and I also have cbp project files for every library, executable we have in our codebase, and to keep it aligned (with those globbed cmakelists files) and avoid that it had to be adjusted each time files came and go, I created this glob feature (but kept it simple and only in the xml file, no gui).

Though we are, as said, no longer using glob in cmake I still think our CB project variants are having added value from the fact they glob. They are a second tool, not the official build tool (cmake/make is).
So personally I think the improvements are nice, the fact it can happen at runtime, and not only at project load. A gui in front of it, is also nice. The saving of some settings per "globbed file", might be tricky, and I something I wouldn't do (my feeling : to much added complexity).


I once already experimented with the generated cbp files from cmake, but CB never was able to launch the entire workspace, and after 30 minutes I gave up. Still something I am gonna further investigate.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version