Angular project in subfolder of Git worktree emits cache at root of main Git repo
メンテナーはふだん 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 の本文から書いたものです。
説明
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)
- Site1/
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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
angular/angular-cli のほかの issue
-
area: @angular/build gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
angular/angular-cli#33955 ·
メンテナーはふだん 1 日以内に返信
-
area: @angular/cli gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
angular/angular-cli#33055 · コメント 1 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
-
stats.json is non-deterministic when two component stylesheets produce the same output file対応中かも @sdjayna が 1 日前に担当しました。 オープンarea: @angular/build gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
angular/angular-cli#34209 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
angular/angular-cli#34207 ·
メンテナーはふだん 1 日以内に返信
-
area: @angular/build gemini-triaged
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
angular/angular-cli#34198 ·
メンテナーはふだん 1 日以内に返信
angular/angular-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
automated issue report
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
github/copilot-sdk#2804 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
drizzle-team/drizzle-orm#6418 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
diegosouzapw/OmniRoute#15307 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信