Open mtaron opened 8 years ago
Thanks for reporting this, I can reproduce it locally and get the same error. The compiler did run for longer than an hour to get to this point though - did you have a similar experience or am I doing something wrong?
Yeah, I am seeing the super slow performance as well. I let the build go overnight. :\
As per my comment in the StackOverflow issue, I'd love to take a look at. Feel free to send information to the mail address dontnetnative@microsoft.com. It's a bit easier for our internal tracking if you come in that way. :-)
I have repro'd this issue and we're investigating. It's getting stuck in a piece of the compiler that is trying to work out all of the various generic instantiations that you'll eventually want. Will report back in a bit with some more info.
So the error is a bug we'll be fixing for Update 2 (spring-ish?). This is a typesystem bug in the nutc component of ILC. We don’t properly flow the generic method parameter (and presumably the generic type parameter) when performing verification that the virtual method is properly structured. The error message is correct, assuming the check in the type system was correct, but unfortunately, the type system check is incorrect for generic type parameters with constraints that are instantiated over the method's type parameters.
Still investigating the absurd build times.
Thanks a lot for looking into this and for the analysis!
Yep. Feel free to tag me if you see other things that are weird (here or in other repos). These issues aren't always easy to get proper testing for and we're super interested in getting them chased down.
So a bit of an update. The compile time issues should be resolved in Update 2. We have replaced on of our cycle detection algorithms with an O(n) implementation. This takes the compile time for the blank app+this library from 1hr+ to 37 seconds on my machine.
That's quite an improvement :) I'm looking forward to give this another spin with Update 2. Thanks again!
Any updates on this? Is there a workaround?
The compile time issue will be corrected in the next set of RTM tools for .NET Native. Depending on your shipping schedule and other constraints we may be able to help out. Please send a mail to dotnetnative@microsoft.com
.NET Native 1.3 is now live and should have all the fixes eluded to above. Do let us know if there are any other troubles/issues. Happy to help.
Is this issue still open?
I am attempting to use MathNet.Numerics in a Universal Windows application. It works fine when I build and run debug, but has the following error when I try to build release. (It is expected that release and debug build can behave differently since release builds use .Net Native: https://msdn.microsoft.com/en-us/vstudio/dotnetnative.aspx). Could be a .Net Native bug, but thought you'd want to know.
NUTC3028:Internal Compiler Error: Method 'instance System.Tuple.Find2Unchecked(MathNet.Numerics.LinearAlgebra.Storage.MatrixStorage'. while computing compilation roots.
4<System.Int32, System.Int32, T, TOther> MathNet.Numerics.LinearAlgebra.Storage.DenseColumnMajorMatrixStorage
11<TOther>, System.Func
3<T, TOther, System.Boolean>, MathNet.Numerics.LinearAlgebra.Zeros)' on type 'MathNet.Numerics.LinearAlgebra.Storage.DenseColumnMajorMatrixStorage1<T>' from assembly 'MathNet.Numerics' tried to implicitly override a method with weaker type parameter constraints while loading type 'MathNet.Numerics.LinearAlgebra.Storage.DenseColumnMajorMatrixStorage
1