-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target .NET 8 #928
Comments
The project supports and works great with the latest .NET versions including .NET 7 and .NET 8. When you say that "Officially the latest release only supports .Net 6.0" what are you referring to? |
Thank you for the quick reply. |
We should not add net7.0 at this time as it will be out of support in a couple months. However, net8.0 should be supported. We should be able to do this fairly easily as it's not a big jump from 6 to 8. @NightOwl888 has already updated the CI to build/test with 8 anyways. Of course, for posterity, there's nothing stopping you from using Lucene.net 4.8 beta in .NET 7+ today, even though it doesn't target it. |
What is going out of support is the .NET 6 runtime. The target framework
I suspect we probably wouldn't be having this conversation if we had just stuck with We do need to add tests for .NET 8.0, but barring any additional performance improvements that are discovered in APIs that only exist in .NET 8.0, there really is no compelling reason to increment our target framework until after the runtime is long gone. .NET 6 is the minimum version of the .NET Core runtime that is supported by |
Actually, not. I recently re-partitioned my machine because I didn't have the disk space to install the .NET 8 SDK, but that has been addressed so we can move forward. |
Ah I was thinking of b1476ae which I see now was for the Sonar pipeline. I think we can keep this issue open for future .NET 8 targeting, and agreed with all the points above. |
As for adding a So, there is a cost-benefit tradeoff here:
lucene-cli Roll Forward SupportThere is also the matter of the one executable that we distribute - lucene-cli. We need to add .NET 8 support ASAP. We multi-target all of the latest supported runtimes and should continue to do so as new runtimes are released and phased out. This makes the distribution size larger than any other 2-3 years after a Lucene.NET release, Microsoft will drop support for all runtimes in that release. For now, our highest supported runtime uses the Documentation won't be required if Microsoft finishes the UX to make it automatically default to the latest runtime, though (dotnet/sdk#30336). So, if they release that before our release we should be fine. But if not, we should document this so years after a given release users will have the ability to use the original tools that shipped with it on the latest .NET runtime. |
Scratch that, it doesn't sound like this is a complete replacement for documentation. Their plan seems to primarily to keep the upgrade explicit instead of implicit, but fix it so the installation will fail if the proper runtime is missing with the instructions on how to roll forward. We should also make it more clear in the README and on the website that we currently support the latest .NET core runtime, even future runtimes. So, there are 4 tasks to take away from this. The first 3 will need to be done in this order:
|
on my machine i did see performance improvements by targeting net8. if someone is using net6, the upgrade path to 8 is very easy. |
@eladmarg - Do you mean you compiled Lucene.NET with a |
yes, i replaced in the solution net6 -> net8, did some adjustments to make this compile, and see the improvement. of course as @rclabo said, its working on net8 but performs faster when compiled as net8. |
I'm scratching my head at this. That could be true, but why would it be true? I mean, net8 is a faster environment but you'd get that speed improvement if your app is targeting net8 even if the LuceneNET library is not specifically targeting it, wouldn't you? (shrug) |
Regarding replacing net7.0 tests/CLI target with net8.0, I think we can and should go ahead and do this. .NET 7 will be out of support in two months, while .NET 8 will be supported for a few more years. And unlike the unsupported .NET 5 target for testing .NET Standard support, .NET 7 provides (AFAICT) no value beyond ensuring it works on .NET 7, which again should be mostly irrelevant in a few short months. I'll take this part on. |
I suspected this would be the case. I think this has to do with the fact that the BCL is spread across a lot of assemblies. If you depend on an assembly that targets For example, the So, what is probably happening with the |
@NightOwl888 Thanks for explaining this. That's a bit eye-opening for me. |
I totally agree with this approach. |
* Target .NET 8, #928 * Lucene.Net.Store.NativeFSLockFactory: Added FEATURE_SUPPORTEDOSPLATFORMATTRIBUTE so we don't have an #ifdef hard coded to a specific target framework. This fixes the CA1416 warning after targeting net8.0, and will make future targeting simpler. * Lucene.Net.Store.NativeFSLockFactory: Removed `using System.Runtime.Versioning` and sorted using directives * Remove unused method --------- Co-authored-by: Shad Storhaug <[email protected]>
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Officially the latest release only supports .Net 6.0. With 6.0 going out of support this year it would be good to support the newer versions. (.Net 8.0) Are there any expected issues with the upgrade?
Describe the solution you'd like
Added compatibility for .Net 8
Additional context
No response
The text was updated successfully, but these errors were encountered: