-
Notifications
You must be signed in to change notification settings - Fork 653
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
Updating UtilPack.NuGet.MSBuild to NuGetUtils.MSBuild.Exec #1634
Conversation
…Utils.MSBuild.Exec.
…ory name in .props file.
FYI, I've found out that the CI build process generated faulty |
…successfully now. Also modified the task factory parameter as needed.
For my part, the pull request is ready for review. I've tested with small test .csproj with both .NET Desktop and .NET Core, and I think Mono should be fine too, since AppDomains are no longer used anyway. I'm not sure why the checks fail - based on messages, they seem quite random (SSL errors or npm failing). |
Also, one thing I should mention: the
These can be worked on, though, if the minimum requirements are gonna cause problems. |
…g with ITaskItems (seen as String arrays to GitVersionTask).
…Version into stazz/NuGetUtilsUpdate
…e thorough check later though.
…down the amount of process invocations used by the task factory.
Regarding the upgrade of requirements to .NET 4.6 and .NET Core 2.1, I think it's fine. We already have breaking changes planned for 5.0.0, so I think it's a good fit. |
@asbjornu Glad to hear the requirements upgrade is ok! Related to #1644 , yeah, the GitVersionTask no longer uses MSBuild logging at all. In some way, this is a bit of regression, but I'm sure it can be fixed by introducing concept of verbosity to input parameters of tasks, which can they propagate it to loggers. Right now, I can't think of any quick fixes which could bring any major improvement to NuGetUtils or to this PR. @dazinator , just ping me if you need any help with the review, I think the changes are quite straightforward. |
I see. Removing the integration with MSBuild might be a bummer for some users. What are your thoughts on this, @dazinator and @arturcic? |
@asbjornu The detailed discussion about this is in issues #1554 and #1537 , but to summarize:
When I talked with @dazinator some months ago about this, he said that losing access to MSBuild stuff ( If access to MSBuild-specific stuff is critical, I guess you would need to give up on using NuGetUtils task factory, and ship dependencies within the NuGet package, and handle native assembly loading logic. I guess the @dazinator and @arturcic know the best route to proceed here. |
Thanks for the thorough explanation, @stazz. Personally, I have no problems with dropping the MSBuild integration, but I'm not sure I'm representative of GitVersion's full audience. Let's wait for @dazinator and @arturcic's input before we move ahead. |
Sorry I haven't had a chance to look at this yet, will try and pick up this weekend! |
If the MSBuild Task object is reused, calls after the first call to the Execute method fail because of the Reset.
Consolidate all the logging calls that was separated out into the base Task class rather than confusing multiple locations.
Bugfix/logging
Now that #1644 is merged, I'm afraid we need you to rebase and resolve the conflicts of this PR, @stazz. To avoid the merge commits, could I ask you to please do the following? git remote add upstream https://github.com/GitTools/GitVersion.git
git fetch upstream
git checkout stazz/NuGetUtilsUpdate
git rebase upstream/master
# Resolve conflicts, add and commit
git push --force |
Seems like that rebase didn't quite work out. No worries, I'll fix it in #1645, which will resolve this when merged. |
/rebase |
The rebase failed:
To rebase manually, run these commands in your terminal: # Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/rebase stazz/NuGetUtilsUpdate
# Navigate to the new directory.
cd .worktrees/rebase
# Rebase and resolve the likely conflicts.
git rebase --interactive --autosquash master
# Push the new branch state to GitHub.
git push --force
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/rebase |
@arturcic I'm holding off the review for this as it looks like there are conflicts to resolve on the proj files still. Once this PR is in good shape again i'll happily review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts to resolve atm
@dazinator, I've resolved the conflicts and performed a fresh rebase in #1645. Can you please review that? |
Hi,
As discussed in #1554 and #1537 , there is a need to change UtilPack's way of executing everything in MSBuild process, as that causes big problems with NuGet versioning (binary-incompatible changes even on minor version change, and the
dotnet build
command lock NuGet version to specific one).This change contains various modifications in GitVersionTask project, which makes it:
The GitVersionTask is now invoked via separate process by task factory of NuGetUtils.MSBuild.Exec package.
I have run only very preliminary tests so far, but starting PR process already to see how automated tests fare as well.