-
-
Notifications
You must be signed in to change notification settings - Fork 175
Update to .NET 6, Update libgit2sharp to include macOS ARM64 #689
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
Conversation
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.
Looks great! Thank you for contributing.
…nk.GitVersioning into dev/timill/net6-m1
Head branch was pushed to by a user without write access
Sorry, I had to fix the source generator, I didn't know you would commit on top of this while I was trying to fix it, lol. It should actually build now! |
…nk.GitVersioning into dev/timill/net6-m1
Gahhh, alright, I got as close as I could. I'm not sure what needs to be flipped for the x86 tests on Windows to run and why it's now getting BadImageExceptions. The other tests should be okay, and they all run locally on my M1 Max Mac and pass. I can come back to fix that test, but if you want to, you can commit to it. I won't disrupt, lol. Thanks again for building this! |
BadImageFormatException typically means you're loading the wrong an assembly with a mismatched bitness. For example the x86 test process may be trying to load an x64 binary. That binary could by libgit2 or it could even be an arch-specific managed assembly. I may have time to look into it today. |
I fixed a couple more issues, but the kicker is that the MSBuild.Locator is finding the 64-bit MSBuild when running on .NET 5. The odd thing is we've had .NET 5 in a 32-bit process find 32-bit MSBuild before, so I don't know what about this PR broke it. I'll keep looking into it. There may be a bug elsewhere that we need to workaround. |
I'm tackling a smaller number of problems in #696 first. Then I'll come back to this. |
@drasticactions now that my smaller PR has completed, which included a libgit2sharp upgrade, is there anything more you actually need? Your PR would add testing on net6.0, which is not something that my PR did. |
I think so? The only thing that might need to be added is this, Nerdbank.GitVersioning/src/NerdBank.GitVersioning/LibGit2/LibGit2GitExtensions.cs Line 176 in a0e4dd7
There is a call to look for the correct libgit2 library, and that might need the call to get the ARM64 version, but I'm not sure if that code is called or not. IMO you can close this PR and add that change yourself if it's needed. |
Done in #697. Thanks for catching what would likely have been a regression from my change. |
In order to use GitVersioning with the .NET 6 SDK on the M1, we need to update libgit2sharp to the newest release, which includes macOS ARM64 (libgit2/libgit2sharp.nativebinaries#132) support.
So, in order to use that, we also need to update the base library to include .NET 6.
I also had to include some using fixes for the tests, since it got an ambiguous reference between 'System.IO.Compression.ZLibStream' and 'Nerdbank.GitVersioning.ManagedGit.ZLibStream'.