-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Added .NET Core Support (OpenNLP.NET 1.9.1.2-preview0001) #14
Added .NET Core Support (OpenNLP.NET 1.9.1.2-preview0001) #14
Conversation
…ework folder to NuGet package
… file because of a bug in Fake.Core.ReleaseNotes that prevents the version from being lowered: fsprojects/FAKE#2680
177f6a5
to
57553f2
Compare
…est/ubuntu-latest/macOS-latest
Alright, I got all of the tests passing on Windows, macOS and Linux in GitHub Actions after adding a separate stage for testing. There are still some things that could be optimized. But, since I have limited experience with Paket and Fake, I would prefer that you tackled them, if interested. The entire build/test takes only 15 minutes now, and the optimizations may save about 1/3 of that time.
|
Thank you @NightOwl888! IKVM for .NET Core is a really awesome news. Do you have use case for targeting |
Currently, The future plans are to keep Under the hood in .NET, there are actually only 4 different assembly versions and all of .NET Core runs on the same version. This is why I mentioned the Here is an example of an assembly compiled with But the current thinking will be to discourage putting IKVM "ports" like this on NuGet.org and instead package For the time being, since OpenNLP.NET is already in the wild, it makes a good test case until the IKVM tooling is completed. |
BTW - I am curious where you came up with this approach for writing the strong name key as a BLOB. We fixed the |
I was looking a way to sign unsigned assemblies restored from NuGet, because we had to deploy in GAC. Back in a day I found that it is possible to do using Mono.Cecil by Jb Evans using StrongNaming capabilities In 2019 during adoption to .NET Core 2.0 they changed API jbevain/cecil#548 and introduced option to load key from BLOB |
|
||
http https://sergeytihon.files.wordpress.com/2021/11/ikvmbin-8.1.5717.0.zip | ||
http https://dlcdn.apache.org/opennlp/opennlp-1.9.4/apache-opennlp-1.9.4-bin.zip | ||
http https://archive.apache.org/dist/opennlp/opennlp-1.9.1/apache-opennlp-1.9.1-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you reverted OpenNLP from 1.9.4
to 1.9.1
?
Upd: I saw your comment about but in FAKE, but for some reason you decided to go with lower version...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done because Lucene 8.2.0 (the version which we have ported our OpenNLP extension from) targeted 1.9.1. The most recent version, 9.2.0, also still targets 1.9.1.
In theory, it should work with 1.9.4 if they are using semantic versioning. This is just to mitigate any risk where the version makes a difference.
Done, package available on NuGet - https://www.nuget.org/packages/OpenNLP.NET/1.9.1.2-preview0001
This is looks resolved for me
This is a little bit unfortunate for me personally, because I work primarily on macOS these days and have hard access to Windows.
I am also skeptical, it sounds promising but I am not sure that it will work technically. How would you determine dependencies between In this repo, I've tried to use jdeps to infer dependencies between But this approach failed on Stanford.NLP.NET) and I still manually maintain dependencies, versions and build order. IIRC, |
Thanks. It looks like we ended up pushing an update to IKVM to fix some bugs that were reported with resolving class paths. https://www.nuget.org/packages/IKVM/8.2.0-prerelease0809 I don't have any direct evidence that this patch directly affects OpenNLP APIs, but we have a very small sampling of the tests for OpenNLP, so there could be some parts of it that are not functional without the IKVM patch (and even with it).
Yes, sorry that comment was already obsolete before I posted the PR.
Actually, it will probably function with the Windows or Linux builds if you run
Good info to have. We will definitely need to find an approach that works across Java build tools. Also dependency resolution should work if there are mixed
I am curious what the limitation of Looks like an alternative is JarAnalyzer. Although, the original source URL is offline, it is still available on the Internet Archive. |
I believe this one - https://issues.apache.org/jira/browse/MJDEPS-15 When I run it on all assemblies I get an error that there are multi-release packages
and with So caller should identify Multi-Release JAR Files manually (at least now) and process them separately. it is still an issue for me on
|
You might want to check out the latest work on |
@NightOwl888 Am I right that in order to build I found strange code in this PR
With such build process it is not clear what the point to build for 2 targets |
You are right. These were not meant to be swapped around. Unfortunately, not having a combined .NET Core executable is a bit confusing. |
I've tried to update to the next release of IKVM and run
and it fails with currently I am not sure what is the right way to use |
You probably need to use |
Close this PR because #15 is merged. |
This relies on a preview build of IKVM, the first release with .NET Core support (as well as .NET 5+). This IKVM build is definitely not production ready, but we could use some help with testing to get it ready, so it would help if this is released as a preview on NuGet when you get a chance.
I have made a build of OpenNLP.NET and run our 26 tests on macos-latest, ubuntu-latest, and windows-latest (the latter both in x64 and x86) on net48, netcoreapp3.1, net5.0, and net6.0 and they are all green. The 6 OpenNLP.NET tests are also passing on windows for both net461 and netcoreapp3.1, but I am having trouble getting Paket to download anything on macOS in GitHub Actions. I attempted to upgrade Paket, but that didn't change the results.
Do note that there is no official
ikvmc
version to build from macOS at this point, since the tools rely on native bits that haven't been ported yet to macOS. And it will probably be dumbed down in the future to emulate the way csc.dll works on .NET Core so the current command options may break in a futureikvmc
release. I changed the strategy for GitHub Actions to build on Windows and then transfer the binaries to Windows, Linux and macOS to test on.Also note that the assemblies don't have a TargetFrameworkAttribute so when viewing them in decompilers, the .NET Core assemblies show as .NET Framework 4.0. If you wish to add the attribute, you will need to create
.java
files that contain annotations using this syntax and then reference the file with the-assemblyattributes
option inikvmc
.There is a bug in Fake that is preventing from releasing a lower version than the last release during the release notes parsing (fsprojects/FAKE#2680), so I added 3ba44b5 which can be reverted after the release to put the 1.9.3 and 1.9.4 releases back in. I will leave it up to you whether you want to upgrade those now as previews, or wait until IKVM has a stable release.