mpxj icon indicating copy to clipboard operation
mpxj copied to clipboard

Update to latest IKVM

Open wasabii opened this issue 2 years ago • 1 comments

A new effort to maintain IKVM has been started at https://github.com/ikvm-revived/ikvm. We have the blessing of a few Windward folks.

A lot has been done in the last few months which may completely alter the way mpxj approaches .NET support. We now have a project called IKVM.Maven.Sdk which lets you directly reference Maven packages from your .NET projects. And these projects can themselves then be published to NuGet.

It may be worth investigating this.

(also I basically run the new IKVM)

wasabii avatar Nov 15 '22 23:11 wasabii

Hi @wasabii many thanks for reaching out, and thanks for taking up the reins on IKVM, I'm excited to see the project move forward. I'm planning to switch to using the new IKVM for MPXJ 11.0.0 as it's a fairly big change. Hopefully I'll be able to deliver this early in the new year. I'll take a look at the Maven SDK as part of that work.

I'll let you know as I make progress - thanks again!

Jon

joniles avatar Dec 05 '22 12:12 joniles

Hi @wasabii, sorry it's been a while but I now have progress to report on this front. As you may remember from brief conversations we had elsewhere, the main issue I had with the migration from "legacy" IKVM to "modern" IKVM were the changes I was able to apply using the legacy version of IKVM to make MPXJ more C#/.Net-like (properties instead of getter and setter methods, method name changes etc) - without going some way towards replicating these, switching directly to MPXJ based on the new version of IKVM would be painful for existing users.

I toyed with a variety of approaches to making a smooth transition for users of the current MPXJ NuGet packages, but ultimately the route I've chosen to take is to provide users with two options:

  1. Documented the use of IKVM.Maven.Sdk directly to access MPXJ with the Java API "as-is". This may suit users starting new projects, and some existing users.
  2. I've created a new package called MPXJ.Net which provides a thin wrapper around MPXJ as delivered by IKVM.Maven.Sdk. This has allowed me to provide all of the syntactic sugar I had previously applied using the legacy IKVM version (properties, method naming etc), plus take those changes a little further by providing an API which only uses .Net data types and data structures. For existing users of the relevant MPXJ NuGet packages this will still require some migration work, but much less than switching back to the original Java API would have been, plus they get the advantage of being able to dispense with having to deal with any "mismatch" between Java types, Java collections etc from their .Net code.

The MPXJ.Net package is marked as prerelease at the moment. MPXJ will be receiving a major version bump release in the next few weeks, at which point I'll remove the prerelease label from the MPXJ.Net package. My intention is to provide both the old legacy IKVM packages and the new MPXJ.Net package until the following major version bump, at which point I will stop publishing the legacy IKVM packages and mark them as deprecated on NuGet. So... the legacy IKVM packages will be hanging around for a little while longer to allow users time to migrate, but the end is in sight!

Finally, thank you for all the work you are doing to push IKVM forward, I check in every few days on the project and am genuinely excited to see the work in progress as it evolves. The IKVM.Maven.Sdk package is revolutionary (in my opinion!) and I hope more people in the .Net community start to take advantage of it to build on the ecosystem of mature Java libraries out there.

joniles avatar May 15 '24 11:05 joniles

This is so cool man. Glad it worked!

wasabii avatar May 16 '24 01:05 wasabii