News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

UI for project globs aka automatic source directories

Started by BlueHazzard, February 04, 2023, 12:14:53 AM

Previous topic - Next topic

killerbot

I tried a build I made from your repo, and I can confirm my project files remain unaltered  :)

killerbot

please activate this on trunk if you can, since your repo/clone does not contain clangd client, which means many functionality is gone.

BlueHazzard

Quotesince your repo/clone does not contain clangd client
i do not understand? This is in the git repo, i use it all the time...

Quoteplease activate this on trunk if you can
is in trunk, with many other fixes...

killerbot

#18
I just switched back to trunk, so no longer from your repo, and the behavior of modified cbp files is back.
And clangd client completion is back.

The diff is due to the following options being saved in the cbp file:
* addToProject=0
* id = some magic value
* wildcard now after the recursive


If this is stable, then I could indeed do a one time commit of all my changed project files ...


UPDATE :
when opening the project file once more, and closing it, CB again says there are changes, I select yes to save them once more, diffing the outcome ==> no change

So when opening my workspace and closing it I have to click 200 times :-(
Please fix this part , since this is rather troublesome

BlueHazzard

QuoteThe diff is due to the following options being saved in the cbp file:
* addToProject=0
* id = some magic value
* wildcard now after the recursive
I do not see any "easy" possibility to not add this to the project glob project file entry, and keep the features. I would have to store if this were in the origin project file and save only if there. But this would make the code a lot more complicated and not really dev friendly...

Quotewhen opening the project file once more, and closing it, CB again says there are changes,
Can you try my last changes? If they do not fix it, can you give me a minimal example project, i can not reproduce it with my test cases...

[edit:] And thank you a lot for testing!

killerbot

still the same, will provide a small project later today

killerbot

attached a little project
open it up in CB, allow it to save the adjusted project file (make a cop of it)
open it up again, once it still thinks there are changes, allow it to save, compare to the copy ==> identical
==> this repeats forever

BlueHazzard

Thank you a lot!
I think my last commit fixes the error.

killerbot

Confirmed, and it doesn't even try to add the id field, and switch the order.
So it nicely keeps old style projects untouched :-)

many thanks.

killerbot

I spotted another regression, when a workspace is opened which contains several projects (say all glob ones, in my case), only the active project has been "scanned", all the other projects have no sources (in the project tree view they also don't have the expand indicator), once you activate the project manually, they get populated.
As such CB is completely useless for such workspace, because trying to build the workspace or a project that has one of those unpopulated ones as dependencies leads to nothing.

Could this be fixed urgently ?

BlueHazzard

I can reproduce it, at the moment i have no idea why and i will look into it.
But it can take until weekend....

BlueHazzard

Ok, i think i fixed it in trunk. This should emulate the old behaviour. On loading the workspace all globs get updated. After loading workspace Globs get only updated if you
a) activate the project
b) reload the project

The question is if it would be better to activate file system watches for all projects (also inactive, but this would probably impact performance) or to update globs before building, what also would impact the build performance... Any suggestion?

killerbot


killerbot

could you please fix the problem which I think is a result of the adjusted glob, when I have such a project open, and I edit a file, and I safe that file (or by compiling it autosaves), it always closes.
I mentioned this problem before  I think, but I had to upgrade now also CB on my main system, and the annoyance is now so big I can no longer use CB in production (before it was on my secondary system which I don't use that much, so I tried to live with it there).


BlueHazzard

I never encountered this problem.
I reckon your code generation deletes the files and regenerates them instead of overwriting?
I will try to reproduce and find a fix....