Author Topic: UI for project globs aka automatic source directories  (Read 12662 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #15 on: February 18, 2023, 10:07:03 pm »
I tried a build I made from your repo, and I can confirm my project files remain unaltered  :)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #16 on: February 21, 2023, 09:35:19 am »
please activate this on trunk if you can, since your repo/clone does not contain clangd client, which means many functionality is gone.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: UI for project globs aka automatic source directories
« Reply #17 on: February 21, 2023, 11:47:05 pm »
Quote
since your repo/clone does not contain clangd client
i do not understand? This is in the git repo, i use it all the time...

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

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #18 on: February 23, 2023, 07:43:04 pm »
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
« Last Edit: February 23, 2023, 07:49:30 pm by killerbot »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: UI for project globs aka automatic source directories
« Reply #19 on: February 24, 2023, 12:23:16 am »
Quote
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
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...

Quote
when 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!

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #20 on: February 24, 2023, 11:27:42 am »
still the same, will provide a small project later today

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #21 on: February 25, 2023, 08:59:00 am »
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

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: UI for project globs aka automatic source directories
« Reply #22 on: February 26, 2023, 12:59:24 am »
Thank you a lot!
I think my last commit fixes the error.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #23 on: February 26, 2023, 09:14:47 am »
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.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #24 on: March 23, 2023, 10:46:20 pm »
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 ?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: UI for project globs aka automatic source directories
« Reply #25 on: March 23, 2023, 11:16:56 pm »
I can reproduce it, at the moment i have no idea why and i will look into it.
But it can take until weekend....

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: UI for project globs aka automatic source directories
« Reply #26 on: March 24, 2023, 01:26:23 am »
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?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #27 on: March 24, 2023, 07:40:10 am »
I can confirm it is fixed. Many thanks.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: UI for project globs aka automatic source directories
« Reply #28 on: May 07, 2023, 05:02:03 pm »
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).


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: UI for project globs aka automatic source directories
« Reply #29 on: May 08, 2023, 10:58:47 pm »
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....