pharo-project / pharo-vm

This is the VM used by Pharo
http://pharo.org
Other
113 stars 70 forks source link

Discuss CMakeSetting.json version control #138

Open bencoman opened 3 years ago

bencoman commented 3 years ago

CMakeSetting.json is touched anytime each developer changes a flag from the Visual Studio GUI. We don't really want this polluting the version history. Possibly CMakeSetting.json should be git-ignored, and we version control a CMakeSetting.json.template file.

There may be another option CMakePresets.json & CMakeUserPresets.json being developed...

btw, here is a good starting point for VS ignore... https://www.toptal.com/developers/gitignore/api/visualstudio

guillep commented 3 years ago

Just to state it here, as I said it in the other issue: my idea behind committing the CMakeSettings.json file was to have some kind of template for Visual Studio users... But if it creates more noise than what it solves, maybe we can remove it.

btw, here is a good starting point for VS ignore... https://www.toptal.com/developers/gitignore/api/visualstudio

It seems they do not ignore CMakeSettings.json there.

CMakeSetting.json is touched anytime each developer changes a flag from the Visual Studio GUI. We don't really want this polluting the version history. Possibly CMakeSetting.json should be git-ignored, and we version control a CMakeSetting.json.template file.

There may be another option CMakePresets.json & CMakeUserPresets.json being developed...

btw, here is a good starting point for VS ignore... https://www.toptal.com/developers/gitignore/api/visualstudio

I think we can wait for that? First it has to make it to CMake, then it has to make it to visual studio, so maybe we will have it for 2021 :)

bencoman commented 3 years ago

It seems they do not ignore CMakeSettings.json there.

Ah, well I'm thinking it should. I wonder if the first run of CMake can copy a file CMakeSetting.json.template to CMakeSetting.json if the latter does not exist? I'll experiment.

Perhaps a revision number on one line of file can be compared between "template" & "actual" to warn users when CMakeSetting.json.template is updated.

bencoman commented 3 years ago

The #142 committed was WIP that was copying the template file to "CMakeSettings.jsonx" (notice the x on the end). When changed to copy over actual user "CMakeSettings.json", Visual Studio was automatically reparsing "CMakeSettings.json" and messages didn't get shown long enough to understand what was happening. So I believe copying the template over the user build settings will need to be a manual operation per next PR.