Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Invoke intrinsic commands directly instead of creating a process. #1208
This is a second try of pull request #1197.
Since issue #1149 intrinsic commands are now invoked directly from the dotnet.exe program rather than creating a new a new dotnet-intrinsic.exe process. Now that all the commands live inside the same assembly, intrinsic commands that invoke other commands could potentially do so without creating a new process. As creating a process, loading the CLR, resolving dependencies, and JIT-ing code all take a bit of time, this change could speed things up a bit.
I believe the principal change in behavior this change causes is for the DOTNET_CLI_CONTEXT_ environmental variables to be inherit by intrinsic commands created by other intrinsic commands. Currently Microsoft.DotNet.Cli.Program.ProcessArgs() seems to overwrite this environmental variable every time based on command line flags.
There are probably nicer ways of doing this, but I wanted to try the simplest thing possible to see if it would work and if y'all are interested in doing something like this.
Hi @AustinWise, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.