RavenDB and NativeAOT support

103 views
Skip to first unread message

Connor Aaron Roberts

unread,
Dec 27, 2020, 12:48:42 PM12/27/20
to RavenDB - 2nd generation document database
When compiling my C# .NET 5.0 project using NativeAOT, the only warning I get is this:

EXEC : warning : Method `[Sparrow]Sparrow.Json.JsonContextPoolBase`1<System.__Canon>.Cleanup(object)` will always throw because: Invalid IL or CLR metadata [C:\dev\TTO\TTO.Server\TTO.Server\TTO.Server.csproj]

Will this be a problem? If so, I hope you can fix it, because I have to use NativeAOT. Thank you 

Connor Aaron Roberts

unread,
Dec 27, 2020, 1:26:11 PM12/27/20
to RavenDB - 2nd generation document database
Actually, yes, it is a problem

Unhandled Exception: System.InvalidProgramException: Common Language Runtime detected an invalid program.
   at Internal.Runtime.TypeLoaderExceptionHelper.CreateInvalidProgramException(ExceptionStringID) + 0x31
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowInvalidProgramException(ExceptionStringID) + 0x9
   at Sparrow.Json.JsonContextPoolBase`1.Cleanup(Object) + 0xe
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread, ExecutionContext, ContextCallback, Object) + 0x47
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Threading.TimerQueueTimer.Fire(Boolean) + 0x69
   at System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x152
   at System.Threading.ThreadPool.DispatchCallback(IntPtr, IntPtr, IntPtr) + 0x3f

Oren Eini (Ayende Rahien)

unread,
Dec 28, 2020, 6:30:02 AM12/28/20
to ravendb
We are doing a lot of runtime code generation, to improve performance. 
I assume that this hits issues with AOT?

Can you send us a way to reproduce?

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/05d80208-2e1c-4feb-87f1-d1441eb939fen%40googlegroups.com.


--
Oren Eini
CEO   /   Hibernating Rhinos LTD
Skype:  ayenderahien
Support:  sup...@ravendb.net
  

Connor Aaron Roberts

unread,
Dec 28, 2020, 8:28:17 PM12/28/20
to RavenDB - 2nd generation document database
I just created a document store as usual and this happens

Oren Eini (Ayende Rahien)

unread,
Dec 29, 2020, 7:13:05 AM12/29/20
to ravendb
Are you using the client API? In what version?


Reply all
Reply to author
Forward
0 new messages