We generate some files during build and store them in the $(TEMP) folder. The problem here is that our build machines host multiple build agents, and the $(TEMP) folder is globally shared among all of them. As a result, there is a potential for collision if two or more of the build agents on a build machine happen to be running concurrent builds of Axe.Windows with different version information.
We generate these files on every build, meaning that we build the entire solution a lot in the inner dev loop. Something as simple as rerunning a unit test from the IDE causes a full build of all projects that are in the dependency list for that unit test. That's only a few seconds each time, but it slows down the inner loop.
This PR does 3 things:
Instead of putting the generated files in $(TEMP), we now put the generated files in .\src\bld. This gives each agent a private copy of the files, and since the folder is already listed in the .gitignore file, it has no side effects on the git state.
One of the auto-generated files was always the same content. This file is now included as a checked-in file under .\src\Attributes and auto-injected into each shipping project.
The auto-generated file that contains the version information now persists across builds and only gets rebuilt if the file doesn't already exist or if the contents of the file are different from what would otherwise be generated. This optimization dramatically speeds up the inner loop since it removes unnecessary compiles when nothing has changed.
Validation scenarios:
Build with a clean environment (ran git clean -fdx before starting VS). Build succeeds
Manually edit the generated files and build again. Generated files get rebuilt
Rebuild. Generated files do not get rebuilt
Modify the .csproj file to simulate a different version, then Rebuild. Generated files get rebuilt
Motivation
Improve the inner dev loop, remove potentially hard-to-troubleshoot problems, and keep the code in sync with AIWin, where these changes will become more crucial as signed manifests come into play.
Details
This applies changes analogous to those included https://github.com/microsoft/accessibility-insights-windows/pull/1480 and https://github.com/microsoft/accessibility-insights-windows/pull/1486. The root issue is twofold:
$(TEMP)
folder. The problem here is that our build machines host multiple build agents, and the$(TEMP)
folder is globally shared among all of them. As a result, there is a potential for collision if two or more of the build agents on a build machine happen to be running concurrent builds of Axe.Windows with different version information.This PR does 3 things:
$(TEMP)
, we now put the generated files in.\src\bld
. This gives each agent a private copy of the files, and since the folder is already listed in the.gitignore
file, it has no side effects on the git state..\src\Attributes
and auto-injected into each shipping project.Validation scenarios:
git clean -fdx
before starting VS). Build succeedsMotivation
Improve the inner dev loop, remove potentially hard-to-troubleshoot problems, and keep the code in sync with AIWin, where these changes will become more crucial as signed manifests come into play.
Context
Pull request checklist