Unity-Technologies / Unity.Mathematics

The C# math library used in Unity providing vector types and math functions with a shader like syntax
Other
1.38k stars 156 forks source link

Merge burst submodule into master #246

Closed unpacklo closed 8 months ago

unpacklo commented 9 months ago

Shenanigans I had to do in order to get burst standalone project tests to pass.

This whole problem comes from the fact that we used to have an AssemblyInfo.cs which made internals visible to tests but it was deleted in the burst/submodule branch. I don't know exactly why, but it looks like we're relying on the project (via msbuild) to create the AssemblyInfo.cs instead. I tried to figure out how to just emit the internals visible to by modifying the project, but I couldn't get it to work.

@tgjones It's a bit unfortunate that this is how I'm making things green for burst, but surely we can make the internals visible to burst without my hacksaw operation? The current state of this branch allows burst standalone tests to pass https://unity-ci.cds.internal.unity3d.com/job/32009812/dependency-graph but all CI fails https://unity-ci.cds.internal.unity3d.com/job/32009796/dependency-graph

tgjones commented 9 months ago

@unpacklo for reference, here's a representative error from one of those CI jobs:

1) Error : Unity.Mathematics.Tests.TestAffineTransform.affine_transform_construct_from_float3x3()
System.NullReferenceException : Object reference not set to an instance of an object
at Burst.Compiler.IL.Tests.TestCompilerAttribute+TestCompilerCommand.Setup () [0x0007f] in <10dc17d7092f400ebd80a41b1618cd95>:0
at Burst.Compiler.IL.Tests.TestCompilerCommandBase.ExecuteMethod (NUnit.Framework.Internal.TestExecutionContext context) [0x00024] in <10dc17d7092f400ebd80a41b1618cd95>:0
at Burst.Compiler.IL.Tests.TestCompilerCommandBase.Execute (NUnit.Framework.Internal.TestExecutionContext context) [0x00006] in <10dc17d7092f400ebd80a41b1618cd95>:0
at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork () [0x0000d] in <be0e2b70ca254bb684417cccea7d5290>:0

TestCompilerCommand.Setup is too big to guess what the problem might be, but hopefully debugging it locally should work.

I tried to figure out how to just emit the internals visible to by modifying the project

I think <InternalsVisibleTo> only works in SDK-style csproj's, which you've changed it to in this branch, but the master branch uses an old-style .csproj.