-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Presets are not reloaded when an included file is changed until reloading the whole project #3963
Comments
@Hugal31 I believe this should be fixed in the most recent pre-release, could you try the most recent pre-release version? |
@gcampbell-msft @Hugal31 I verified on the latest pre-release version and the issue has been fixed. ENV: |
I still have the issue using
Another way to reproduce is
|
@Hugal31 Thank you very much for your reply! Would you be able to provide some screenshots or recordings so we can look into the issue? |
Sure, Here is a video and the minimal project. I tried with vscode 1.92.1 CMakeToolsBug.mp4EDIT: I can't make the video works on Github so here it is in a .gz: |
@Hugal31 @moyo1997 We reproduced the problem using the project provided by the customer, after changing the filename of presets.json and the values of THE_OTHER_VAR and THE_VAR in the project, we ran the command CMake:Delete cache and reconfigure, the variables are not changed. If you resave the CMakePresets.json file after the variables are good. ENV:
|
@Hugal31 I believe this is fixed in the latest pre-release! |
I still have it with v1.20.3 (pre-release) on VScode 1.92.2 :/ |
@Hugal31 @v-frankwang Could it be due to the fact that your file is named @v-frankwang Could you test? Thanks. If not, please create a new issue with the details necessary for us to investigate. Thanks! |
I don't know why that was the case, but in the .tar.gz I provided it's really CMakePresets.json and the bug is present. |
@Hugal31 Ah, re-reading your most recent repro steps, I think that the issue is due to the fact that we only create listeners for the files on startup. If you rename and save, in the current implementation, a reload will be needed. I'll reopen this and put it on our backlog. |
Brief Issue Summary
When adding an include directive in a CMake preset, any change made to the included files won't trigger a reload of the presets. Any further CMake configure will not take in account the changes, until the CMake(User)Presets.json is modified or VSCode is restarted.
If VSCode is restarted, then the included file seems to be added to the watches and it works as expected.
CMake Tools Diagnostics
Debug Log
No response
Additional Information
To reproduce:
Create a preset-based project
In the CMakeLists.txt, display a cache or env variable.
Use the "include" directive in the preset and in the main CMakePresets.txt, inherit from a configurePreset.
Change the varaible in the included preset file.
E.g.
CMakePresets.json:
presets.json
Then try to change the variables in presets.json and reconfigure. The changes are not taken in account.
Restart VSCode and it works fine.
The text was updated successfully, but these errors were encountered: