Skip to content

The net6.0 test build is coupled to the net462 Mono AOT step #2

Description

@parth-io

Problem

CI runs the default net6.0 test flow, but the build fails on Linux/macOS with
mono: command not found, though net6.0 doesn't need net462 or Mono.

Cause: build.proj's TestBuild compiles the whole solution, which
includes the net462 Clojure.Compile project even if the CI is testing net6.0 which
doesn't need Mono. Its post-build target
(Clojure.Compile.csproj) AOT-compiles the standard library by running the
net462 compiler, via Mono for Unix:

<TargetCmdline Condition=" '$(OS)' == 'Unix' ">mono $(TargetPath)</TargetCmdline>

So net6.0 CI drags in Mono purely as a build side-effect, to produce net462
artifacts it never loads (net6.0 loads the stdlib from source / embedded resources
at startup; only net462 needs the AOT + ILMerge).

Current stopgap

.github/workflows/tests.yml now installs Mono on the Linux/macOS too.

Why decouple

  • Removes an irrelevant dependency
  • Clearer build graph

Proposed approach

When TestTargetFramework != net462, don't build Clojure.Compile /
Clojure.Main461 (or skip the Mono AOT post-build).

Activity

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