Skip to content
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

Update GitVersionTask to latest version to resolve issue requiring MS… #319

Merged
merged 3 commits into from
Dec 21, 2020

Conversation

keyboardDrummer
Copy link
Collaborator

Update GitVersionTask to latest version to resolve issue requiring MSBUILDSINGLELOADCONTEXT workaround

bkragl
bkragl previously approved these changes Dec 20, 2020
Copy link
Member

@bkragl bkragl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, this will hopefully resolve the main source of issues coming in lately :)

In the CI log I saw warnings of the following kind:

/home/travis/.nuget/packages/gitversiontask/5.5.1/build/GitVersionTask.targets(10,9): warning : 2020-12-20 16:18:25		    WARN [12/20/20 16:18:25:14] Failed to inherit Increment branch configuration, ended up with: master, origin/master [/home/travis/build/boogie-org/boogie/Source/BoogieDriver/BoogieDriver.csproj]
/home/travis/.nuget/packages/gitversiontask/5.5.1/build/GitVersionTask.targets(10,9): warning : Falling back to master branch config [/home/travis/build/boogie-org/boogie/Source/BoogieDriver/BoogieDriver.csproj]

And packages with a strange version number (incremented minor version):

Successfully created package '/home/travis/build/boogie-org/boogie/Source/BoogieDriver/bin/Debug/Boogie.2.9.0-PullRequest0319.16.nupkg'.

But I guess the correct version will be computed after merging.

@bkragl
Copy link
Member

bkragl commented Dec 20, 2020

OK, there is actually a problem! I just tried to compile on my Ubuntu 20.10 machine, and it does not work. A lot of exceptions, apparently because of a library called LibGit2Sharp that is not supported on recent Ubuntu versions:
GitTools/GitVersion#1744

It's really annoying that this GitVersion thing cannot just work.

Two options:

  1. We don't merge this and need to continue to advertise the MSBUILDSINGLELOADCONTEXT workaround for all platforms.
  2. We merge this and need to advertise the BOOGIE_NO_GITVERSION workaround to Ubuntu users (which means that they won't be able to generate packages with correct version numbers).

@bkragl bkragl dismissed their stale review December 20, 2020 17:12

See comment about LibGit2Sharp issues on Ubuntu

@keyboardDrummer
Copy link
Collaborator Author

The MSBUILDSINGLELOADCONTEXT problem should be solved from GitVersionTask version 5.3.0. I'm guessing that version suffers from the same Ubuntu problem as the 5.5.1 in this PR, but it might be worth to try if it doesn't : )

We merge this and need to advertise the BOOGIE_NO_GITVERSION workaround to Ubuntu users (which means that they won't be able to generate packages with correct version numbers).

Is it important for anything but the build server to generate versioned packages? Can we not only enable GitVersion on the build server?

@bkragl
Copy link
Member

bkragl commented Dec 20, 2020

The MSBUILDSINGLELOADCONTEXT problem should be solved from GitVersionTask version 5.3.0. I'm guessing that version suffers from the same Ubuntu problem as the 5.5.1 in this PR, but it might be worth to try if it doesn't : )

Yes, it does. Turns out that even the current version 5.1.2 does. I kept the BOOGIE_NO_GITVERSION setting when recently switching to Ubuntu 20.10 and actually never compiled with GitVersion on that machine.

Is it important for anything but the build server to generate versioned packages? Can we not only enable GitVersion on the build server?

Yeah, maybe this is the best move. Of course it would be nice to get the correct version number in binaries, but it is much more annoying that people constantly run into issues building Boogie. Once the day comes when GitVersion works reliably, we can re-enable it.

If others agree, let's do the following:
Change BOOGIE_NO_GITVERSION to BOOGIE_GITVERSION (flipping the conditional) in Directory.Build.props and set it in the Travis script.

Also, I think it makes sense not to generate the package files on every building.
Can you drop <GeneratePackageOnBuild>true</GeneratePackageOnBuild> and instead call dotnet pack Source/Boogie.sln in the Travis script? And drop the line about a generated package from the README.

@shazqadeer @michael-emmi @zvonimir

@keyboardDrummer
Copy link
Collaborator Author

keyboardDrummer commented Dec 20, 2020

Thanks, I don't often do "instruction driven programming" but I have to say it's very efficient :D

@keyboardDrummer
Copy link
Collaborator Author

Shall we merge this?

@shazqadeer shazqadeer merged commit 8b542a6 into boogie-org:master Dec 21, 2020
@shazqadeer
Copy link
Contributor

@keyboardDrummer : I appreciate your contribution in this PR towards addressing a longstanding annoyance for Boogie users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants