-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an MSBuild task to call MinVer #989
Conversation
Thanks very much @bording, I'm in the process of reviewing. |
This looks really nice, is it still be reviewed? |
@adamralph very cool. I think exposing the cache is a nice idea and lowers the barrier to entry for this sort of change. For me, it still makes sense to move MinVer into its own task though, cause at the moment when there's no cache it needs to spin up a new process, and it needs to have a good |
@slang25 thanks for chiming in.
The .NET SDK has to be present to be building a project in the first place. If there is no
Note that this PR isn't changing that. A switch to
That's true, but that seems to be very fast. E.g. if I run minver-cli from the command line (which is the equivalent of what the current MinVer target is doing) on fresh git repo (with no commits) it returns almost instantly. So again, I think the performance benefit would be incremental, perhaps even insignificant. More generally, I appreciate that we can squeeze out more performance by switching to in-process invocation in a task, and in-process git manipulation using |
@adamralph you have me convinced 🙂 My It might be worth looking at perf again, I have a local branch that uses GitReader, but I have one last annoying bug (related to annotated tags). Although now that libgit2sharp is being maintained again it's probably best to use that. |
@slang25 for me a switch from out of process Git invocation to in-process |
closing in favour of #1021 |
This PR adds an MSBuild task assembly that is used to call MinVer instead of using the built-in
Exec
task that was used previously.This custom task lets us cache the result of the MinVer call, so that MinVer only needs to be invoked once per build.
The cache key uses all of the relevant MinVer input parameters, so if projects are configured to use different values, they will properly not share cache results.
This is the first step of addressing #112.