Skip to content

Publish a UnityEngine-free source set that builds outside Unity #1130

Open

Description

DISCLOSURE: LLM-GENERATED TEXT

Related to #804, but narrower: no asmdef split is needed for this.

Problem

DoxReloaded compiles a UnityEngine-free part of this package outside Unity, in a plain netstandard2.1 project, so its solver and generator run on .NET in CI and benchmarks (Benchmarks/DoxReloaded.UnityCompat/DoxReloaded.UnityCompat.csproj in Ambiguous-Interactive/DoxReloaded). It lists 55 package files by hand: Core/Random/*, Core/Serialization/WallstopProto/*, Objects, WallMath, and the IEnumerable/IList/String/Dictionary/Enum/Random extensions, among others. It replaces Utils/Buffers.cs with a shim, because that file needs UnityEngine.

Moving 3.6.2 → 3.7.1 broke that build with CS0246/CS0117 in package files. No consumer code changed. The listed files now need 11 more files:

needed by new dependency
IEnumerableExtensions, IListExtensions, DictionaryExtensions ValueEnumerator, ValueEnumerable, ValueDictionaryEnumerable, ValueDictionaryEnumerator, IEnumerableExtensions.ValueEnumerable
EnumExtensions EnumValues, EnumValuesCache
Objects ObjectsTypeTraits
ProtobufUnitySurrogates INullableCollectionWrapper, NullableCollectionPresence
WProtoFacade SerializationFailureException

Two more are internal members of Utils/Buffers.cs, which needs UnityEngine: SystemArrayPool<T>.RentForPrivateOwner, SystemArrayPool<T>.ReturnForPrivateOwner and PooledArrayClearPolicy<T>. Core/Extension/StringExtensions.cs (Base64) and Core/Helper/WallMath.cs (statistics) now call them. So a Core file depends on a Unity file.

Ask

  1. Move SystemArrayPool<T>, PooledArray<T> and PooledArrayClearPolicy<T> into a file that does not need UnityEngine, for example Utils/SystemArrayPool.cs. Keep the namespace and API.
  2. Publish the UnityEngine-free set as one MSBuild item list, for example Runtime/UnityHelpers.Core.props with <Compile Include=... /> entries relative to the package root, or a .csproj under Tests~/Samples~.
  3. Add a CI job that builds that set for netstandard2.1 with no UnityEngine reference. A new cross-file dependency then fails upstream, not in a consumer.
  4. Name the set in the changelog when it grows, as you do for bundled DLLs.

Acceptance

  • dotnet build of the published set succeeds with no UnityEngine or UnityEditor reference.
  • StringExtensions, WallMath, EnumExtensions, IEnumerableExtensions, Objects, Core/Random/* and Core/Serialization/WallstopProto/* are in the set.
  • No file in the set references a member declared only in a UnityEngine-dependent file.
  • DoxReloaded can replace its 55-line list with the published one.

Activity

  1. wallstop commented on Nov 10, 2026

    @wallstop
    CollaboratorAuthor

    DISCLOSURE: LLM-GENERATED TEXT

    PR #1156, head e2e1727, separates SystemArrayPool, PooledArray and PooledArrayClearPolicy from Buffers.cs into their own source files. The normalized type bodies and documentation match the originals; namespaces and public signatures stay intact. Source-build documentation lists the new files and remaining helper dependencies. Native buffer/lease and animation controls pass 184 selected cases, and all compiler profiles pass.

    This is partial source separation, not completion of the portable source set. A real no-Unity compile of the consumer-style selection still reports 125 distinct missing-Unity/dependency errors across 13 files. No portable props contract or broad conditional behavior change is published on that evidence. Keep #1130 open. CI is running; raw identity and rejected portability captures stay ignored under progress/.artifacts/session-20261109-night/.

  2. wallstop commented on Nov 10, 2026

    @wallstop
    CollaboratorAuthor

    DISCLOSURE: LLM-GENERATED TEXT

    Review update for #1156: the executable pool type bodies remain unchanged. The moved XML examples were also corrected to use the existing public length field instead of nonexistent Length/Array members. The earlier source-plus-documentation identity receipt describes the pre-review move; documentation equality is no longer claimed for the final head. The portable source dependency-closure work remains open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions