Arcade: Don't install tools that are already available

Created on 6 Feb 2020  路  2Comments  路  Source: dotnet/arcade

Native toolset bootstrapping doesn't do any version checking and will install a native tool even if it is already available on the system. This can sometimes be extra gigs of space and take an excess amount of time.

native-toolset-bootstrapping

Most helpful comment

Would it make sense if CI builds that require native tools run in containers that we can install the exact versions of the tools in? Then the repo would just specify which container they need and they'd get the exact tool versions they need. No need to install anything.

All 2 comments

I think there are actually two cases to consider here when determining if a tool is already available: infrastructure builds and local developer builds.

For local developers a non-exact match is likely preferred over an exact match. For example if I have a copy of Visual Studio on my machine that has a C++ compiler or CMake version which is greater than the version required by the repository then I don't want bootstrapping to bring down the exact version. The intention of the developer, by installing Visual Studio, is likely to use the version installed. For the odd case where a local developer does want the exact native toolset versions, and the extra downloads that go with it, they can flip the appropriate switch and do so.

For infrastructure builds, basically official builds, CI, etc .., though the build should only use the machine installation of tools if there is an exact match. Native toolsets just don't have the backwards compatibility necessary for us to use a simple >= check as we would do for a lot of our managed tools. There are plenty of examples we can point to where even patch releases of say CMake took down our builds.

Would it make sense if CI builds that require native tools run in containers that we can install the exact versions of the tools in? Then the repo would just specify which container they need and they'd get the exact tool versions they need. No need to install anything.

Was this page helpful?
0 / 5 - 0 ratings