Open KirillOsenkov opened 2 weeks ago
I temporarily disabled the net8.0 branch here: https://github.com/KirillOsenkov/MSBuildStructuredLog/commit/1a821951b21cc51035fe2bf6126ba1e9143f5f0f
Unfortunately I don't have time to investigate now because I need to unblock users.
@filipnavara if you perhaps have time to investigate this at some point. But it's not urgent, I mitigated it for now.
I'll put it on my backlog. Not sure when I will have time to have a look.
It worked in the local builds of the MSBuild Log Viewer, both in NativeAOT and CoreCLR, on macOS and Windows. I'd probably need more info or test case to see what is broken.
there's absolutely no rush. I've asked for a repro.
@KirillOsenkov @filipnavara I have a repro, but it's a bit involved. I tried to create a console app that shows the same behavior, but I couldn't, however this repro survives git clean -dxf
on my box.
git submodule update --init --recursive
dependabot-core
repo, edit the file nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/NuGetUpdater.Core.csproj
and remove the <PackageReference>
for MSBuild.StructuredLogger
and instead add a <ProjectReference>
to src/StructuredLogger/StructuredLogger.csproj
in this repo.dependabot-core
repo open nuget/helpers/lib/NuGetUpdater/NuGetUpdater.sln
in VS
StructuredLogger.csproj
to the solution.StructuredLogger
-> Reflector.cs
and set a breakpoint on line 55.NuGetUpdater.Core.Test
-> Discover/DiscoveryWorkerTests.Project.cs
and debug the first unit test.Reflector.cs
step and see the exception about the missing field message
, even though the debugger shows it.Thanks. The detailed instructions are much appreciated. I will report back soon.
may need to checkout the binlog viewer repo to https://github.com/KirillOsenkov/MSBuildStructuredLog/commit/1fd03860348b4cc6084fc5cfde2ccbe6cff31a89 to revert my change where I disabled the 8.0 ifdef (https://github.com/KirillOsenkov/MSBuildStructuredLog/commit/1a821951b21cc51035fe2bf6126ba1e9143f5f0f)
I can reproduce it locally. The gist is that the UnsafeAccessor
fails when the field is volatile
:
using System;
using System.Runtime.CompilerServices;
var a = new A();
Console.WriteLine(GetSetFoo(a));
[UnsafeAccessor(UnsafeAccessorKind.Field, Name = "foo")]
extern static ref string GetSetFoo(A args);
class A { private volatile string? foo = "Bar"; }
I'll check with the runtime team if this is expected behavior or bug.
People are reporting that on net8.0 Reflector doesn't work, fails to access fields.