Skip to content

Ship the logging adapters for .NET Framework again - #6

Merged
wasabii merged 3 commits into
mainfrom
chore/restore-net-framework
Sep 15, 2026
Merged

wasabii merged 3 commits into
mainfrom
chore/restore-net-framework

Conversation

@wasabii

@wasabii wasabii commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

IKVM 8.16.0 ships lib/net472 alongside ref/net6.0 and ref/net8.0 — .NET Framework is a platform it supports. The modernization took both libraries from net461;netcoreapp3.1 to net8.0 alone, which drops every Framework consumer IKVM still serves.

That constraint binds harder here than in the Calcite repositories. These are general IKVM extensions — the audience is anyone running Java code under IKVM — so inheriting a net8.0-only floor from a Calcite stack narrows them for a reason that isn't theirs.

Change

before after
IKVM.Extensions.Logging.Java.Util net8.0 net472;net8.0
IKVM.Extensions.Logging.Slf4j net8.0 net472;net8.0

No source change was needed for either.

Nothing is on nuget.org yet — Java.Util is still on 0.1.9 from 2023 and Slf4j has never been published — so widening costs nothing now. After 1.0.1 ships as net8.0-only it becomes a consumer-visible change.

What this does not do

The test projects stay on net8.0;net10.0, so net472 ships unexercised. Two things block a net472 test leg, and neither should be waved through inside this PR:

  • IKVM's native library isn't resolved on .NET Framework without an explicit RuntimeIdentifier. With net472 added to the test projects, all 20 slf4j tests fail at IKVM.Runtime.LibIkvm with Could not load ikvm native library.
  • net472 can't run on the linux-x64, linux-arm64 or osx-arm64 legs of the CI matrix at all, so adding it naively turns three quarters of the matrix red.

Doing it properly means a Windows-only test leg with a RID, which is a deliberate CI change rather than a side effect of retargeting. Worth its own PR.

Verification

  • Both libraries produce net472 and net8.0 output
  • IKVM.Extensions.Logging.Slf4j.Tests — 20 passed on each of net8.0 and net10.0
  • IKVM.Extensions.Logging.Java.Util.Tests — 21 passed on each of net8.0 and net10.0

🤖 Generated with Claude Code

IKVM 8.16.0 ships lib/net472 alongside ref/net6.0 and ref/net8.0, so .NET Framework is a
platform it supports. The modernization took these two libraries from net461;netcoreapp3.1 to
net8.0 alone, which drops every Framework consumer IKVM still serves.

That constraint binds harder here than in the Calcite repositories. These are general IKVM
extensions -- the audience is anyone running Java code under IKVM -- so inheriting a
net8.0-only floor from a Calcite stack narrows them for a reason that is not theirs.

Both libraries now build net472;net8.0, and neither needed a source change. Nothing is on
nuget.org yet, so widening costs nothing now and would be a consumer-visible change after
1.0.1 ships.

The test projects stay on net8.0;net10.0. A net472 test leg does not currently run: IKVM's
native library is not resolved on .NET Framework without an explicit RuntimeIdentifier, so
every test fails at IKVM.Runtime.LibIkvm with "Could not load ikvm native library", and
net472 cannot run on the linux and osx legs of the CI matrix at all. So net472 is shipped but
unexercised, which is worth fixing separately and deliberately rather than by bolting a
Windows-only leg onto a cross-platform matrix.

Verified: both libraries produce net472 and net8.0 output, Slf4j.Tests 20 passed and
Java.Util.Tests 21 passed on each of net8.0 and net10.0.
The build runs on ubuntu-24.04, and adding net472 to the two libraries broke it:

  error MSB4018: The "IkvmCompiler" task failed unexpectedly.
  Failed to start a process with file path 'mono'. ... No such file or directory

IKVM picks the importer by target rather than by host. IKVM.MSBuild.targets sets
IkvmToolFramework to net472 for any target framework compatible with net461, so the net472 leg
is compiled by the .NET Framework build of ikvmc, and on Linux that runs under mono. The
ubuntu-24.04 image no longer carries one.

Install it rather than override the choice. Forcing the net10.0 importer would be reaching past
a decision IKVM makes deliberately about which tool emits a Framework assembly, and the output
is the shipped package.

Only the build job needs this. The tests stay on net8.0;net10.0, and the release job packs
artifacts it downloads rather than compiling anything.

This did not reproduce locally: on Windows the net472 importer runs natively, so both libraries
built clean there.
ikvmnet/ikvm installs mono-runtime and mono-devel on ubuntu-24.04 for the same reason, and
purges mono-complete while stripping the image down, so asking for mono-complete here was
against the practice of the repository this one follows.

The pattern is an install step rather than a prebuilt image: ikvm-github-images carries only
ubuntu-18.04 and ubuntu-20.04 configs, was last touched in 2022, and nothing here runs on it.
Baking mono into an image would mean reviving that repository first.
@wasabii
wasabii merged commit 161e4a7 into main Sep 15, 2026
22 checks passed
@wasabii
wasabii deleted the chore/restore-net-framework branch September 15, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant