We are using Embarcadero RAD Studio 10.4 with C++, and all of our code base is in GIT.
Some files cause us problems when saved in GIT, and these are the .CBPROJ
files.
They are XML files read by the IDE to know about the projects. When 2 developers work on the same project, there is often conflicts when merging a PR.
Also, even if a developer has only modified some .CPP
files, the .CBPROJ
get changed, too. Just reshuffling of the files, but it is very annoying and causes a lot of noise when reviewing a PR. As a matter of fact, people just skip reviewing the PR and wait for the build to know if something is wrong or not.
How could we make it so that we have fewer problems with .CBPROJ
files in GIT?
We discovered lately that some parts of .CBPROJ
act like binary: some CDATA section, so we cannot indicate to GIT that .CBPROJ
are text files.
You need to normalize the contents of the CBPROJ file before checking it in to any version control system. There is a 3rd party tool for Delphi projects named DprojNormalizer, it may work for C++Builder projects too, since they have a similar project structure.
https://www.uweraabe.de/Blog/2017/01/18/dproj-changed-or-not-changed/
https://www.uweraabe.de/Blog/2017/01/24/dprojnormalizer-for-xe7-and-xe8/