-
Notifications
You must be signed in to change notification settings - Fork 126
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
Errors with beta 2 #236
Comments
Odd, this looks like basic functionality that's well covered by tests. We are also using |
This repro'd for me both locally and on CI build for https://github.com/onovotny/NuGetKeyVaultSignTool Just change the version in the props file: https://github.com/onovotny/NuGetKeyVaultSignTool/blob/master/Directory.Build.Props CI build: Look at the Pack step, at the bottom its log file, same problem. |
@onovotny I see that you're referencing both Microsoft.SourceLink.GitHub and Nerdbank.GitVersioning. Could you temporarily remove Nerdbank.GitVersioning and see if the problem still occurs? Looking at the historical issues around that caused "StrictFilePathMarshaler must be used on a FilePath" errors, it's been related to having more than one copy of LibGit2Sharp in memory. Those sorts of problems should have been mitigated, but I'm wondering if there is some new reason it would be causing a problem. |
@onovotny Does removing Nerdbank.GitVersioning fix the issue? |
Sorry, have not had a chance to take a look yet |
It still repros for that even when I remove NB.GV. |
Any ideas? |
@onovotny What do I need to be doing to repro it? It seems to be working fine when I build/pack from Visual Studio. |
hmm...I just tried again and it's not repro'ing for me right now. very odd given that it repro'd locally and on Azure DevOps. |
wait...I see something. With the 2.2.101 SDK, I see the errors, even on Azure DevOps. When I try the 3.0.100-preview 2 SDK to build, I don't. I'm guessing that we both have the 3.0.100 preview sdk as the default. Adding a global.json to pin the 2.2.100/101 sdk should cause it to repro locally. |
Moreso, it works with the 3.0 SDK but not the 2.2 SDK: Build with 2.2.101, you see this: If you open the nupkg in NuGet Package Explorer and double-click the dll, you'll see the embedded ppdb data showing the sourcelink. It's wrong there, pointing at local files. Built with the 3.0.100-preview2 sdk, here, doing the same thing, the sourcelink works correctly: |
I actually don't have a 3.0 SDK installed on this machine. I typically keep prerelease stuff on a VM instead. The only SDKs I have installed are 2.1.503 and 2.2.102. 2.1.100/101 includes the 2.2.0 runtime, but 2.1.102 has the 2.2.1 runtime. I wonder if there was a bug fixed that could be relevant? Can you try bumping up to 2.1.102 and see if that fixes things for you as well? |
Weird... 2.2.102 fails here on Azure DevOps. It's just doing a dotnet build/pack. Look at the Pack step, at the logs, and at the bottom you'll see the errors. https://dev.azure.com/onovotny/GitBuilds/_build/results?buildId=1608 |
Okay, so if you build from Visual Studio, it's fine. If you build with However, if you examine the binlog from invoking I just installed the 3.0.100-preview-010184 SDK, and it does not produce the warnings, just like you said, @onovotny. @tmat Is is possible that dotnet/coreclr#21606 is in 3.0 SDK preview 2? If so, then I think that might be the answer. |
I have not tried building from VS |
At this point I suspect we're hitting the custom marshaler bug when running against .NET Core, and assuming it has already landed in the released 3.0 builds, it would explain why it's fine in VS (running against .NET Framework) and in 3.0. |
Would that need to be backported to a 2.2 servicing release (or a 2.1 given that's LTS)? Not sure what scenario I have that's tripping this when building this with 2.2 when most people seem to be okay? |
Ideally yes, since if my assessment is correct, that fix is the only way to reliably use LibGit2Sharp from an MSBuild task on .NET Core.
I haven't upgraded to |
@AaronRobinsonMSFT To comment on which versions of Core CLR dotnet/coreclr#21606 is fixed in and possible backporting. |
Thanks @tmat. The issue was fixed in 3.0 preview 2.
@onovotny We addressed this issue based on the following https://github.com/dotnet/coreclr/issues/19654 - it may help you to understand the issue in LibGit2Sharp.
From the looks of this it seems like the issue is related to using the CLI build to consume a library (via a Task/Target?) where the same code works just fine in Visual Studio, right? This makes sense because .NET Framework probably doesn't have the issue and Visual Studio uses .NET Framework for MSBuild. With respect to backporting to 2.2, that is something I would like to avoid unless absolutely necessary (i..e there is no work around). For right now, this does work from Visual Studio, is the 2.2 CLI a hard requirement for the work at hand? @jeffschwMSFT for his thoughts on potential backporting of dotnet/coreclr#21606. (cc @jkoritzinsky) |
FWIW, I'm hitting this as well with a build locally. Only noticed it today, but it's happening for others. |
I get the following errors with beta2, building locally with Vsts package:
|
The StrictFilePathMarshaler warning shows up for me when I use Nerdbank.GitVersioning.
Pull request to reproduce it is: |
I just confirmed what @onovotny mentioned, the previous beta, |
Unfortunately, if this is hitting the bug fixed by dotnet/coreclr#21606, and at this point it seems quite likely, then I don't think there's a workaround for it. We'd need that to be backported. |
* add Nerdbank.GitVersioning * temp remove SourceLink * try switching Froto.Parser.Test from netsoreapp2.0 to 2.1 * use Froto.sln * latest dotnet 2.2.3 * try 2.2.2 * sdk is 2.2.105 * dist: xenial * remove Froto.TypeProvider from Froto.sln * back to netcoreapp2.0 * git fetch --unshallow * Revert "fix Enum in message body error (#96)" This reverts commit 40a86c7. * add version.json * disable nbgv for exe * use previous SourceLink dotnet/sourcelink#236 * PrivateAssets="All" * upgrade to Nerdbank.GitVersioning" Version="2.3.136 * remove Break()
Can I recommend adding a warning to users/updating the README to point to the functional package if they use the CLI? Just ran into this as well and 3.0 is a trek away still. |
I'm working on upgrading the https://github.com/tonerdo/coverlet.git repo to using sourcelink and the beta2 of this package exhibits the same problem, while beta1 works. |
Fixed by #288 |
Tryign to use beta 2 gives me these errors
Using
1.0.0-beta-63127-02
works correctly,1.0.0-beta2-18618-05
does not.The text was updated successfully, but these errors were encountered: