From 9dc0758495fae0b8eac4b9efb7104bc5b9c41066 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 12 Nov 2026 14:59:01 +0100 Subject: [PATCH 1/2] Move to Nullean.Argh and Nullean.Make 0.30.0 and Proc 0.22.1 Nullean.Make.Fs 0.30.0 replaces `executes (shell { ... })` inside `command { }` with `command { ... } |> executes { ... }`, so the build script moves to that form. Co-Authored-By: Claude Opus 5.5 --- Directory.Packages.props | 4 ++-- build/scripts/Program.fs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index b141278..b24e6d1 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -29,8 +29,8 @@ - + - + diff --git a/build/scripts/Program.fs b/build/scripts/Program.fs index 868caed..3e3a0b8 100644 --- a/build/scripts/Program.fs +++ b/build/scripts/Program.fs @@ -53,8 +53,8 @@ let main argv = for project in projectsToClean () do sh $"dotnet clean {project} -c Release -v q" } | Build -> command { - composes [Clean] - executes (shell { sh $"dotnet build -c Release" }) } + composes [Clean] } + |> executes { sh $"dotnet build -c Release" } | Test -> target [Build] { sh $"dotnet run --project tests/Laya.Tests/Laya.Tests.csproj -c Release" } | Pack -> command { requires [Build]; composes [Generatepackages; Validatepackages; Generateapichanges] } | Ci -> command { requires [Test]; composes [Generatepackages; Validatepackages; Generateapichanges] } From 544a462b734aa81fe6dbd41c7611cec3a121cbf0 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 12 Nov 2026 15:40:27 +0100 Subject: [PATCH 2/2] Target net10.0 and net11.0 in libraries, net11.0 elsewhere Libraries keep a net10.0 build for consumers on the LTS and gain net11.0; the CLI, tests and smoke tests move to net11.0 alone. The API diff reads the net10.0 build, the one the previous release ships, and the single folder of the CLI. Nothing runs on the .NET 10 runtime, so mise drops it. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 4 ++-- Directory.Build.props | 6 +++++- build/scripts/Paths.fs | 8 ++++++++ build/scripts/Program.fs | 2 +- examples/layar-aot-smoketest/layar-aot-smoketest.csproj | 2 +- .../layar-torchsharp-aot-smoketest.csproj | 2 +- mise.toml | 3 +-- src/Laya.Cli/Laya.Cli.csproj | 4 ++++ src/Layar.Core/Lang/ScriptDetector.cs | 2 ++ 9 files changed, 25 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6786d5d..4e387cb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,8 +7,8 @@ decision engine. See README.md for the package layout and measured numbers. ## Commands -mise installs the SDK pinned in `global.json` (plus the .NET 10 runtime every project targets). Run everything -through it: +mise installs the SDK pinned in `global.json`; the libraries target net10.0 and net11.0, the CLI, the tests and the +examples net11.0. Run everything through it: ```bash mise run build # build the solution diff --git a/Directory.Build.props b/Directory.Build.props index d4141e8..d7839bf 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - net10.0 + net11.0 latest enable enable @@ -27,6 +27,10 @@ true + + net10.0;net11.0 + true Nullean and contributors Nullean diff --git a/build/scripts/Paths.fs b/build/scripts/Paths.fs index 7b6edfd..89462ef 100644 --- a/build/scripts/Paths.fs +++ b/build/scripts/Paths.fs @@ -5,6 +5,8 @@ open System.IO let ToolName = "Layar" let Repository = "nullean/layar" +/// The framework the public API diff reads from the previous release and from this build: the oldest the libraries +/// target, which every release ships let MainTFM = "net10.0" let SignKey = "" @@ -39,6 +41,12 @@ let Root = let RootRelative path = Path.GetRelativePath(Root.FullName, path) +/// The build output the API diff reads: a library's MainTFM folder, or the one folder of a project that targets a single +/// framework (a dotnet tool, net11.0 alone) +let ApiDiffOutput (projectDirectory: string) = + let library = $".artifacts/bin/{projectDirectory}/release_{MainTFM}" + if Directory.Exists library then library else $".artifacts/bin/{projectDirectory}/release" + let Output = DirectoryInfo(Path.Combine(Root.FullName, "build", "output")) let ToolProject = DirectoryInfo(Path.Combine(Root.FullName, "src", ToolName)) diff --git a/build/scripts/Program.fs b/build/scripts/Program.fs index 3e3a0b8..b325424 100644 --- a/build/scripts/Program.fs +++ b/build/scripts/Program.fs @@ -73,7 +73,7 @@ let main argv = let report = Path.Combine(output, $"breaking-changes-{id}.md") let projectDirectory, assembly = Paths.packageInfo id // quoted: an unquoted | would pipe - sh $"dotnet assembly-differ diff 'previous-nuget|{id}|{version}|{Paths.MainTFM}' 'directory|.artifacts/bin/{projectDirectory}/release' -a --target {assembly} -f github-comment --output {report}" } + sh $"dotnet assembly-differ diff 'previous-nuget|{id}|{version}|{Paths.MainTFM}' 'directory|{Paths.ApiDiffOutput projectDirectory}' -a --target {assembly} -f github-comment --output {report}" } | Docs -> target [] { Documentation.build () Documentation.serve port.Value } diff --git a/examples/layar-aot-smoketest/layar-aot-smoketest.csproj b/examples/layar-aot-smoketest/layar-aot-smoketest.csproj index 2619d02..4231c4b 100644 --- a/examples/layar-aot-smoketest/layar-aot-smoketest.csproj +++ b/examples/layar-aot-smoketest/layar-aot-smoketest.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 layar_aot_smoketest true false diff --git a/examples/layar-torchsharp-aot-smoketest/layar-torchsharp-aot-smoketest.csproj b/examples/layar-torchsharp-aot-smoketest/layar-torchsharp-aot-smoketest.csproj index 5816c69..6512b1c 100644 --- a/examples/layar-torchsharp-aot-smoketest/layar-torchsharp-aot-smoketest.csproj +++ b/examples/layar-torchsharp-aot-smoketest/layar-torchsharp-aot-smoketest.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net11.0 layar_torchsharp_aot_smoketest true false diff --git a/mise.toml b/mise.toml index 62d7f59..36c711a 100644 --- a/mise.toml +++ b/mise.toml @@ -8,8 +8,7 @@ DOTNET_CLI_TELEMETRY_OPTOUT = "1" DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "1" [tools] -# "10": every project targets net10.0, so the tests and the build run on the .NET 10 runtime -dotnet = ["""{{ read_file(path='global.json') | split(pat='"version"') | nth(n=1) | split(pat='"') | nth(n=1) }}""", "10"] +dotnet = ["""{{ read_file(path='global.json') | split(pat='"version"') | nth(n=1) | split(pat='"') | nth(n=1) }}"""] gh = "latest" zizmor = "1" diff --git a/src/Laya.Cli/Laya.Cli.csproj b/src/Laya.Cli/Laya.Cli.csproj index 13928b6..07bfa6b 100644 --- a/src/Laya.Cli/Laya.Cli.csproj +++ b/src/Laya.Cli/Laya.Cli.csproj @@ -2,6 +2,10 @@ Exe + + + net11.0 Laya.Cli