Skip to content

Release v0.6.0#29

Merged
skydread1 merged 9 commits into
mainfrom
develop
Jun 8, 2026
Merged

Release v0.6.0#29
skydread1 merged 9 commits into
mainfrom
develop

Conversation

@skydread1

Copy link
Copy Markdown
Contributor

v0.6.0 - 2026-06-07

Stock-ClojureCLR coexistence for Unity consumers that keep ClojureCLR as the editor runtime, plus IL2CPP workaround-selection fixes.

Compiler

  • set! on a hinted mutable deftype field emits a castclass, fixing unverifiable IL that IL2CPP's transpiler rejects - #27.

Magic.Unity

  • Coexistence: while a strong-named Clojure.dll is under Assets, fork .clj.dll plugins are excluded from the editor (and restored when it leaves), keeping stock RT's clojure.core.clj probe away from fork assemblies - #25. Editor scripts compile against the stock assembly in that state - #24.
  • IL2CPP workaround signatures come from player compilation references instead of an editor AppDomain scan, keeping editor-only assemblies (e.g. Mono.WebBrowser on Windows) out of the signature pool - #23.
  • The workaround resolver searches project-local player reference directories - #26.
  • csc.rsp -r: references count as player references and are logged for build-log verification.
  • README documents the benign coexistence console lines (Assembly is incompatible with the editor).

skydread1 added 9 commits June 5, 2026 15:51
…compilation references (#23)

The workaround generator walked the type reference closure from
Assembly-CSharp against the editor's full desktop BCL, trimmed only by
a Unity prefix check. On Windows that reaches editor-only assemblies
like Mono.WebBrowser, and signatures referencing them break the IL2CPP
build.

Select assemblies from the CompilationPipeline player compilation
references instead, log the reference set and each skip, and fail the
build if the set ever looks degenerate.

Closes #23
…ors (#24)

A stock ClojureCLR in Assets makes Unity dedup Clojure.dll in favor of
the Assets copy, so the package compiles against stock and fails on
fork-only bootstrap API (CS0117), and the Editor pre-build rewrite
resolves against the wrong DLLs.

Bind the fork-only bootstrap members in Magic.Unity.cs via reflection;
with stock present the bootstrap is skipped. Anchor the Editor rewrite
to the package install path instead of typeof/Assembly.Load and drop
the Clojure and Magic.Runtime precompiled references from the Editor
asmdef.

Closes #24
…25)

Stock clojure.lang.RT probes Assembly.Load("clojure.core.clj") during
init, finds the fork-compiled DLL, and throws a TypeLoadException
storm. While a strong-named Clojure.dll is present under Assets, an
asset preprocessor now imports fork clj.dll plugins with editor
loading off, and a reconcile step reimports them when that state
transitions, in either direction. The IL2CPP rewrite and link.xml
generator discover clj assemblies from player compilation references
instead of the editor domain, so a coexisting editor cannot silently
produce a build without workarounds or link.xml entries.

Closes #25
…orkaround resolver (#26)

The Cecil resolver in GenerateGenericWorkaroundMethods only searched
four directories, so player assemblies under Library/PackageCache or
in Assets plugin folders failed to resolve and silently dropped out
of the reference walk, leaving their generic value-type signatures
without IL2CPP workarounds. Add the directory of every player
compilation reference to the resolver, excluding editor install
paths: resolving the BCL profile facades there would expand the
workaround closure into desktop BCL assemblies and force them into
every player build. Smoke emission stays byte-identical.

Closes #26
…ure allowlist

CompilationPipeline allReferences never lists references added through
compiler response files, but player code compiles and ships against
them, verified with csc.rsp -r:System.Web.dll on the .NET 4.x API
profile. Signatures touching such assemblies were silently dropped
from IL2CPP workaround generation. Parse the -r:/-reference: entries
of each player assembly's compilerOptions.ResponseFiles into the
allowlist. Smoke emission stays byte-identical on the netstandard
profile, where the compat shims already cover these references.
#27)

The deftype set! compiler emitted stfld without converting the stack
value to the field type, unlike the generic set! compiler. A value
from an invoke return keeps its static type (often Object), and stfld
of that into a type-hinted mutable field is unverifiable IL: Mono
accepts it, IL2CPP rejects the generated C++ with incompatible
pointer type errors. Add the same convert step the generic set!
compiler already has, and a smoke regression case that sets a hinted
mutable field from a conj return.

Closes #27
The full player reference list exceeds Unity's log line limit on
large projects, so the csc.rsp contribution to the workaround
allowlist was unverifiable from the editor log. Log the response
file references on their own short line, "(none)" when empty.
@skydread1 skydread1 self-assigned this Jun 8, 2026
@skydread1 skydread1 merged commit 62454ff into main Jun 8, 2026
2 checks passed
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