Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 acastclass, fixing unverifiable IL that IL2CPP's transpiler rejects - #27.Magic.Unity
Clojure.dllis underAssets, fork.clj.dllplugins are excluded from the editor (and restored when it leaves), keeping stock RT'sclojure.core.cljprobe away from fork assemblies - #25. Editor scripts compile against the stock assembly in that state - #24.Mono.WebBrowseron Windows) out of the signature pool - #23.csc.rsp-r:references count as player references and are logged for build-log verification.Assembly is incompatible with the editor).