From 46a5ec42f7a63ed57c5337f05bd840f730865ae6 Mon Sep 17 00:00:00 2001 From: monsieurleberre Date: Sun, 30 Aug 2026 14:39:36 +0100 Subject: [PATCH 1/3] fix(ci): enable git long paths on Windows runners before checkout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GitHub-hosted Windows images ship git 2.55.0.windows.5 with core.longpaths unset, so actions/checkout aborts with "Filename too long" on any repo containing a path that, once prefixed with the runner's D:\a\\\ workspace root, crosses the 260-character MAX_PATH limit. The failure lands in step 2, before any toolchain setup, so a caller's Windows matrix shards can never start — and a caller has no lever of its own, because build-and-test invokes actions/checkout with no `with:` block. csharp-ci.yaml and scala-ci.yaml now run `git config --system core.longpaths true` on Windows immediately before that checkout. It has to be --system: actions/checkout temporarily overrides HOME before making its own global git config changes, so a --global value written by an earlier step is not read during the checkout itself. The step is pinned to `working-directory: ${{ github.workspace }}` because the job-level `defaults.run.working-directory` points at the caller's `working-directory` input, which does not exist yet before checkout — the same pin the `pack` job's `Validate inputs` step already uses for the same reason. Only these two workflows expose an OS matrix that can place a shard on a Windows runner. go-ci.yaml, terraform-ci.yaml and build-and-test.yaml take a single `runs-on` that resolves to ubuntu-latest or the self-hosted Linux pool, and every remaining checkout in the repo sits in a job hard-pinned to ubuntu-latest, so none of them are reachable on Windows. Claude-Session: https://claude.ai/code/session_01GTo7LMjhYTY3u5NhakUZeb --- .github/workflows/csharp-ci.yaml | 6 ++++++ .github/workflows/scala-ci.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/csharp-ci.yaml b/.github/workflows/csharp-ci.yaml index 051a4ed..fd56966 100644 --- a/.github/workflows/csharp-ci.yaml +++ b/.github/workflows/csharp-ci.yaml @@ -253,6 +253,12 @@ jobs: shell: bash working-directory: ${{ inputs.working-directory }} steps: + - name: Enable git long paths on Windows + if: runner.os == 'Windows' + working-directory: ${{ github.workspace }} + # actions/checkout temporarily overrides HOME before making its own global git config changes, so a --global value set here would not be in effect during the checkout + run: git config --system core.longpaths true + - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/scala-ci.yaml b/.github/workflows/scala-ci.yaml index 5b94448..ab85640 100644 --- a/.github/workflows/scala-ci.yaml +++ b/.github/workflows/scala-ci.yaml @@ -208,6 +208,12 @@ jobs: shell: bash working-directory: ${{ inputs.working-directory }} steps: + - name: Enable git long paths on Windows + if: runner.os == 'Windows' + working-directory: ${{ github.workspace }} + # actions/checkout temporarily overrides HOME before making its own global git config changes, so a --global value set here would not be in effect during the checkout + run: git config --system core.longpaths true + - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 From 74ccd46b9b7421ecafe41926dd6a2c76ed6f6710 Mon Sep 17 00:00:00 2001 From: monsieurleberre Date: Sun, 30 Aug 2026 14:40:53 +0100 Subject: [PATCH 2/3] docs(changelog): record the Windows long-paths checkout fix Claude-Session: https://claude.ai/code/session_01GTo7LMjhYTY3u5NhakUZeb --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d07148..e55af13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fix `csharp-ci.yaml` and `scala-ci.yaml` failing their Windows `build-and-test` shards in `actions/checkout` for consumers whose repositories contain long paths. The GitHub-hosted Windows images ship git with `core.longpaths` unset, so a repo path that crosses the 260-character `MAX_PATH` limit once prefixed with the runner's `D:\a\\\` workspace root aborts the checkout with `error: unable to create file : Filename too long` — in step 2, before any toolchain setup, and with no lever on the caller's side because the `build-and-test` checkout takes no `with:` block. Both workflows now run `git config --system core.longpaths true` on Windows immediately before that checkout. It has to be `--system`: `actions/checkout` temporarily overrides `HOME` before making its own global git config changes, so a `--global` value written by an earlier step is not in effect during the checkout. The step is pinned to `working-directory: ${{ github.workspace }}` because the job-level `defaults.run.working-directory` points at the caller's `working-directory` input, which does not exist yet before checkout (the same pin, for the same reason, that the `pack` job's `Validate inputs` step already carries). Linux and macOS shards are untouched, and Windows consumers whose paths already fit see no change. First hit by `peacefulstudio/daml-codegen-csharp-internal`. (#39) + ## [2.4.0] - 2026-07-14 ### Added From 1669039d9daf6b0bc88786b3158b857543c45fba Mon Sep 17 00:00:00 2001 From: monsieurleberre Date: Sun, 30 Aug 2026 14:57:31 +0100 Subject: [PATCH 3/3] docs(changelog): describe the affected consumer generically Claude-Session: https://claude.ai/code/session_01GTo7LMjhYTY3u5NhakUZeb --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e55af13..47596df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fix `csharp-ci.yaml` and `scala-ci.yaml` failing their Windows `build-and-test` shards in `actions/checkout` for consumers whose repositories contain long paths. The GitHub-hosted Windows images ship git with `core.longpaths` unset, so a repo path that crosses the 260-character `MAX_PATH` limit once prefixed with the runner's `D:\a\\\` workspace root aborts the checkout with `error: unable to create file : Filename too long` — in step 2, before any toolchain setup, and with no lever on the caller's side because the `build-and-test` checkout takes no `with:` block. Both workflows now run `git config --system core.longpaths true` on Windows immediately before that checkout. It has to be `--system`: `actions/checkout` temporarily overrides `HOME` before making its own global git config changes, so a `--global` value written by an earlier step is not in effect during the checkout. The step is pinned to `working-directory: ${{ github.workspace }}` because the job-level `defaults.run.working-directory` points at the caller's `working-directory` input, which does not exist yet before checkout (the same pin, for the same reason, that the `pack` job's `Validate inputs` step already carries). Linux and macOS shards are untouched, and Windows consumers whose paths already fit see no change. First hit by `peacefulstudio/daml-codegen-csharp-internal`. (#39) +- Fix `csharp-ci.yaml` and `scala-ci.yaml` failing their Windows `build-and-test` shards in `actions/checkout` for consumers whose repositories contain long paths. The GitHub-hosted Windows images ship git with `core.longpaths` unset, so a repo path that crosses the 260-character `MAX_PATH` limit once prefixed with the runner's `D:\a\\\` workspace root aborts the checkout with `error: unable to create file : Filename too long` — in step 2, before any toolchain setup, and with no lever on the caller's side because the `build-and-test` checkout takes no `with:` block. Both workflows now run `git config --system core.longpaths true` on Windows immediately before that checkout. It has to be `--system`: `actions/checkout` temporarily overrides `HOME` before making its own global git config changes, so a `--global` value written by an earlier step is not in effect during the checkout. The step is pinned to `working-directory: ${{ github.workspace }}` because the job-level `defaults.run.working-directory` points at the caller's `working-directory` input, which does not exist yet before checkout (the same pin, for the same reason, that the `pack` job's `Validate inputs` step already carries). Linux and macOS shards are untouched, and Windows consumers whose paths already fit see no change. Generated-code trees hit this most readily, since path depth follows source namespaces and grows on its own. (#39) ## [2.4.0] - 2026-07-14