Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Angular project in subfolder of Git worktree emits cache at root of main Git repo

オープン
#34,215 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
angular, git, typescript
領域
build-system, cli

調査の方向性

Start by reproducing the cache discrepancy with the supplied Git worktree layout, using ng cache info and npm run build from both the worktree and main repository. Trace how the Angular CLI chooses the cache path for projects nested under Site#/ClientApp. Done means worktree builds do not create an unexpected root .angular/cache and related projects use appropriately separated, consistent cache locations.

索引モデルが issue の本文から書いたものです。

説明

area: @angular/cli gemini-triaged
Command

build

Is this a regression?
  • Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was

22.0.x

Description

With #33321, the Angular CLI now shares build caches between Git worktrees. However, I'm not sure that it's working as expected with Angular projects that live in folders deeper than the root of the repo.

My repo is a C# solution with 3 web apps using Angular, which looks something like this:

  • Solution/
    • Site1/
      • ClientApp/ (Angular project root)
    • Site2/
      • ClientApp/ (Angular project root)
    • Site3/
      • ClientApp/ (Angular project root)

After upgrading to Angular 22.1+, if I am on a Git worktree and build any of the Angular apps, the main repo gets new cache files at: `/.angular/cache//ClientApp/

Building the Angular projects in the main repo does not use the same cache. Those continue to use the caches at <repo root>/Site#/ClientApp/.angular/. Running ng cache info on an app in the main repo vs a worktree shows this discrepancy:

# From main repo folder
> npx ng cache info

Path              : C:\Path\To\Solution\Site1\ClientApp\.angular\cache

# From worktree folder
> npx ng cache info

Path              : C:\Path\To\Solution\.angular\cache

This feels unexpected for a few reasons:

  • All three unrelated sites are using the same cache, since they are all called ClientApp (due to ASP.NET convention)
  • The cache lives at the root of the main repo, even though there is no Angular project there
  • The main repo doesn't use the same cache location as the worktrees
Minimal Reproduction
mkdir Solution
git init

ng new --skip-git 
# use TestApp as app name for example

git add .
git commit -m "Initial commit"

git worktree add --detach ../Solution-worktree main
cd ../Solution-worktree/TestApp
npm i
npm run build

cd ../../Solution
git status
# Would expect no changes, but new untracked .angular folder with caches is present
Exception or Error

Your Environment
Angular CLI       : 22.2.0
Angular           : 22.2.0
Node.js           : 24.19.0
Package Manager   : npm 11.17.0
Operating System  : win32 x64

┌───────────────────────────────┬───────────────────┬───────────────────┐
│ Package                       │ Installed Version │ Requested Version │
├───────────────────────────────┼───────────────────┼───────────────────┤
│ @angular-devkit/architect     │ 0.2202.0          │ ^0.2202.0         │
│ @angular-devkit/build-angular │ 22.2.0            │ ^22.2.0           │
│ @angular-devkit/core          │ 22.2.0            │ ^22.2.0           │
│ @angular/aria                 │ 22.2.0            │ ^22.2.0           │
│ @angular/build                │ 22.2.0            │ ^22.2.0           │
│ @angular/cdk                  │ 22.2.0            │ ^22.2.0           │
│ @angular/cli                  │ 22.2.0            │ ^22.2.0           │
│ @angular/common               │ 22.2.0            │ ^22.2.0           │
│ @angular/compiler             │ 22.2.0            │ ^22.2.0           │
│ @angular/compiler-cli         │ 22.2.0            │ ^22.2.0           │
│ @angular/core                 │ 22.2.0            │ ^22.2.0           │
│ @angular/forms                │ 22.2.0            │ ^22.2.0           │
│ @angular/material             │ 22.2.0            │ ^22.2.0           │
│ @angular/platform-browser     │ 22.2.0            │ ^22.2.0           │
│ @angular/router               │ 22.2.0            │ ^22.2.0           │
│ @angular/upgrade              │ 22.2.0            │ ^22.2.0           │
│ rxjs                          │ 7.8.2             │ ~7.8.0            │
│ typescript                    │ 6.0.3             │ ~6.0.3            │
│ vitest                        │ 4.1.10            │ ^4.1.10           │
│ zone.js                       │ 0.15.1            │ ~0.15.0           │
Anything else relevant?

No response

主要言語
TypeScript
スター
27k
フォーク
11.8k
平均マージ
22時間 50分
マージ済み PR(30日)
168

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

angular/angular-cli のほかの issue

angular/angular-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。