From 2d1465702ded9b4c3ebab181ce3c2a6aa7fea4d8 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 1 Sep 2026 12:54:56 +0700 Subject: [PATCH] Fix cold-start codegen races without requiring -m:1. Serialize inner TFM builds for projects that write shared generated sources, and always run IdlImp once the parent target decides generation is needed. Co-authored-by: Cursor --- AGENTS.md | 4 ---- README.md | 10 +++------- src/SIL.LCModel.Core/GenerateKernelCs.proj | 4 +++- src/SIL.LCModel.Core/SIL.LCModel.Core.csproj | 2 ++ src/SIL.LCModel/SIL.LCModel.csproj | 2 ++ 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 73dbdb3b..45ab5e3e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,10 +25,6 @@ CI runs on Windows and Ubuntu. See .github/workflows/ci-cd.yml: Always mirror this sequence when validating a change locally. -Use `dotnet build -m:1` for a cold-start build (a tree with no generated sources yet). -Parallel builds race on the generated sources and fail with `LcmGenerate` or `IdlImp` -errors. Plain `dotnet build` is fine once those sources exist. - ### Tests per README (not validated here) - Windows, ReSharper: open LCM.sln and “Run Unit Tests”. - Windows, no ReSharper: use MSBuild, then run nunit3-console.exe from artifacts/Debug/net462. diff --git a/README.md b/README.md index 2257a2e6..701af84b 100644 --- a/README.md +++ b/README.md @@ -29,22 +29,18 @@ with language and culture data, including anthropological, text corpus, and ling On Windows: - - Run `dotnet build -m:1` to build the liblcm library. Alternatively, `LCM.sln` can be + - Run `dotnet build` to build the liblcm library. Alternatively, `LCM.sln` can be built from within Visual Studio. On Linux: - - Source `environ`, then run `dotnet build -m:1` to build the liblcm library. - -Use `-m:1` for a cold-start build (a fresh clone or worktree, with no generated sources -yet). Parallel builds race on the generated sources. Plain `dotnet build` is fine once -those sources exist. + - Source `environ`, then run `dotnet build` to build the liblcm library. By default, this will build liblcm in the Debug configuration. To build with a different configuration, use: ```bash -dotnet build -m:1 --configuration (Debug|Release) +dotnet build --configuration (Debug|Release) ``` ## Debugging diff --git a/src/SIL.LCModel.Core/GenerateKernelCs.proj b/src/SIL.LCModel.Core/GenerateKernelCs.proj index 70a2c87e..bbca4d0a 100644 --- a/src/SIL.LCModel.Core/GenerateKernelCs.proj +++ b/src/SIL.LCModel.Core/GenerateKernelCs.proj @@ -23,7 +23,9 @@ - + + The liblcm library is the core FieldWorks model for linguistic analyses of languages. Tools in this library provide the ability to store and interact with language and culture data, including anthropological, text corpus, and linguistics data. SIL.LCModel.Core provides a base library with core functionality. latest + + false diff --git a/src/SIL.LCModel/SIL.LCModel.csproj b/src/SIL.LCModel/SIL.LCModel.csproj index 854f5fae..9cae3583 100644 --- a/src/SIL.LCModel/SIL.LCModel.csproj +++ b/src/SIL.LCModel/SIL.LCModel.csproj @@ -6,6 +6,8 @@ The liblcm library is the core FieldWorks model for linguistic analyses of languages. Tools in this library provide the ability to store and interact with language and culture data, including anthropological, text corpus, and linguistics data. SIL.LCModel is the main library. liblcm + + false