From e82b36cfbc68106b2aa9e8b829eb169e26585247 Mon Sep 17 00:00:00 2001 From: chinboy Date: Wed, 7 Oct 2026 16:59:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(Toolchain):=20=E4=BF=AE=E5=A4=8D=20Windows?= =?UTF-8?q?=20=E7=BC=96=E8=AF=91=E5=99=A8=E6=BA=90=E7=A0=81=E6=A3=80?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E9=95=BF=E8=B7=AF=E5=BE=84=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/modules/toolchain/build-and-verification.md | 4 ++++ scripts/registration/prepare-native8-compiler.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/docs/modules/toolchain/build-and-verification.md b/docs/modules/toolchain/build-and-verification.md index 07bd8d913..63c8f44ad 100644 --- a/docs/modules/toolchain/build-and-verification.md +++ b/docs/modules/toolchain/build-and-verification.md @@ -85,6 +85,10 @@ Generator 自身不维护一套独立 pack 准备逻辑。`pack --no-build` 只 `src/AtomUI.Toolchain/Backends/ILC8/upstream.json` 的精确来源和版本构建受控 bundle。可通过 `AtomUINative8CompilerSourceRoot` 或 `ATOMUI_RUNTIME8_SOURCE` 指定已有的匹配源码;不匹配的源码不能复用。 +自动准备源码时,在临时 Git checkout 中启用仓库局部的 `core.longpaths`,再检出定版源码,避免 Windows +工作区与 staging 路径叠加后超过传统路径长度限制。不修改全局 Git 配置;已有 checkout 仍须通过精确 HEAD +和源码完整性校验,缺失或被修改的源码不会被自动修复或忽略。 + 默认 bundle 位于 `.artifacts/tools/registration/net8/ilc/managed-bundle`,由 `AtomUINative8ManagedCompilerBundle` 配置。配方校验源码身份、适配器/公共源码内容与既有产物,使用锁和 staging 目录管理构建与发布;原生 helper 由消费发布的 SDK 按受支持版本恢复,不混入通用托管 bundle。 diff --git a/scripts/registration/prepare-native8-compiler.py b/scripts/registration/prepare-native8-compiler.py index e5101143f..7d37582fd 100644 --- a/scripts/registration/prepare-native8-compiler.py +++ b/scripts/registration/prepare-native8-compiler.py @@ -30,6 +30,8 @@ def prepare_source(path, upstream): staging.mkdir() try: run(["git", "init", "--quiet"], staging) + # Runtime source paths exceed Windows MAX_PATH, especially in the staging directory. + run(["git", "config", "--local", "core.longpaths", "true"], staging) run(["git", "remote", "add", "origin", upstream["repository"]], staging) run(["git", "sparse-checkout", "init", "--cone"], staging) run(["git", "sparse-checkout", "set", "eng", "src/coreclr/tools",