apache / apache/lucenenet

AOT compilation support

Open
#1,278 3 comments 0 reactions 1 assignee Claimed by @NightOwl888 View on GitHub
is:feature performance pri:normal
Dominant language
C#
Stars
2.4k
Forks
658
Avg merge
3d 5h
Merged PRs (30d)
9

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I'm trying to build an Avalonia desktop application using Lucene.NET. but I want to publish as an AOT executable.
However, when I perform an AOT build on an app using Lucene, the following runtime error occurs.

I used the sample code below.
https://lucenenet.apache.org/

```
Application: AvaloniaAOTTest.exe
CoreCLR Version: 10.0.6
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) + 0x133
at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0xbf
at System.Delegate.DynamicInvokeImpl(Object[]) + 0x50
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs) + 0x14b
at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive, RoutedEventArgs) + 0xfd
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs) + 0x3c
at Avalonia.Controls.Control.<>c.<.cctor>b__66_0() + 0xdf
at Avalonia.Threading.DispatcherOperation.InvokeCore() + 0x192
at Avalonia.Threading.DispatcherOperation.Execute() + 0x5f
at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation) + 0x78
at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean) + 0xf0
at Avalonia.Win32.Win32Platform.WndProc(IntPtr, UInt32, IntPtr, IntPtr) + 0x58
at AvaloniaAOTTest!+0x82c99a
```

I can run the program by commenting out the sections that use Lucene.
Does this project support AOT? If not, are there any plans to add support?

Thanks.

### Describe the solution you'd like

AOT available

### Additional context


Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.