0

I am working on a project using Wix, which naturally produces a bunch of .wxs files when building.

Should these files be under source control? Seemingly "un-reviewable" changes to .wxs files appear each time something is built, leading to a pretty bloated repository. Is it okay to add these files to .gitignore?

5
  • What changes are you seeing in the *.wxs files? Are they auto-generated every time you build? WiX has several file types that should not be checked in such as .wixpdb, .wixobj (and probably more). These are generated files and should be kept out of source control. Feb 23, 2021 at 19:46
  • As a rule of thumb (not perfect but a good starting point): if a human edits some file, the file goes in source control. If the computer produces the file on its own, the file does not go in source control. This leaves a puzzling case: what about a file that's mostly produced and edited by the computer, but humans sometimes tweak? And, what about files that are produced by a program, but usually don't change after that and most users don't have the program that produces the file? Those require judgment.
    – torek
    Feb 23, 2021 at 20:53
  • @SteinÅsmul Thanks for answering. I am talking about the .xml files here. These files change a lot with every miniscule change you do to the configuration, which leads to every pull request being very large even for a tiny change, which bloats the entire code review process Feb 24, 2021 at 16:18
  • @torek Thanks for answering. I think this is one of those cases; one one hand you end up with HUGE pull requests for even the tiniest configuration change due to the auto-generated code, but on the other hand you occasionally need change a line in these files (such as the version number). After doing some more digging it seems like it is best to keep these files checked in after all. Feb 24, 2021 at 16:21
  • 1
    To some extent, this is a Procrustean-bed solution, but: if you can come up with a tool that reads a human-readable version and generates or updates the computer-generated XML, that fixes the problem. Now you have a tool (in source control) and a human-readable/writable version file (in source control) and generated "binaries", even if they're XML, that are not in source control.
    – torek
    Feb 24, 2021 at 22:12

3 Answers 3

2

I am working on a project using Wix, which naturally produces a bunch of .wxs files when building.

The rule is: You must put in source control all the files that are needed to build your wix setup.

If the .wxs are output files generated during the build of your setup, you mustn't commit them.

If they are used as input but updated, you have to commit it and can't ignore them.

Perhaps you could have a look at git skip-worktree feature if you want to ignore the changes during the build.

But looking at my project, .wxs file are xml files (so humanly understandable files) used as input so you have to commit it.

But in my project, I don't think they are updated when building the Setup, so I think that you should provide more information and an example of the diff you get to better understand the problem (is it when you update the listing of the files?)

3
  • Thanks for answering. Well the core issue I have is that you get huge pull requests even for tiny configuration changes, which bloats the code review process in my opinion. The .wxs files are updated after you build, so maybe in this case I can do without them... Feb 24, 2021 at 16:25
  • @DavidMontgomery You perhaps could also stage and commit just the part changed by the humans.
    – Philippe
    Feb 24, 2021 at 17:18
  • Yeah maybe that is the way to go Feb 24, 2021 at 17:58
0

The *.wxs files are source code files required to build your Wix project. These files should be included in source control.

Here is a list of all file types used by Wix: https://wixtoolset.org/documentation/manual/v3/overview/files.html

-1

If your .wxs files are binary, then you can use git lfs to keep them out of the repository folder on the remote server, but you can retrieve these when you want them, in your local repository, when you require them. So you save time downloading the files you actually need.

More information on git lfs in the git documentation, https://git-lfs.github.com/

3
  • 1
    From what I know, .wxs are xml files. So that's not the format that is difficult to understand but the data i.e what that descibes. So no need to use git lfs...
    – Philippe
    Feb 23, 2021 at 14:54
  • 1
    @Philippe is correct, the files are in .xml format Feb 24, 2021 at 16:25
  • 1
    In your build do you have a clean option, where you can remove all output files from a build, and is the output, in a folder where that folder is in the .gitignore file, so this would not be committed. If this is true then your build options can be amended so you would not have these files committed into git. Feb 24, 2021 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.