Skip to content

[3.0] Typescript --build causes infinite loop of compiling #26612

Closed
@natew

Description

@natew

Expected behavior:

Using --build should not loop.

Actual behavior:

What is frustrating about reporting this issue is this is happening a big-ish monorepo and I've tried about 20 different configuration setups now and they seem to break in different ways so I it's hard to really point out what's causing this. It sometimes acts nicely and then at some point I'll see it going through an endless loop and kill it, but I often have little clue as to which save started the loop or which config caused which loop.

Once it does happen I can replicate it very consistently, and it happens often. Though replicating it in code for you would be really hard, as it's a large and layered monorepo.

Basically I have a monorepo with about 30 packages, 6 top level apps, and a lot of "middle" level packages along the way. Oftentimes packages use the same leaf-level ones.

I have validated many things: All the configs are valid, they all build properly by themselves and I can run just about any of them in order. There are no type errors.

I wrote a little more on it here: #25600 (comment)

Here's an example --verbose log:

[13:22:47] File change detected. Starting incremental compilation...

[13:22:48] Found 0 errors. Watching for file changes.

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/mobx-bridge/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/stores/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-desktop/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-electron/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/css/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/config/tsconfig.json'...

[13:22:58] File change detected. Starting incremental compilation...

[13:22:58] Found 0 errors. Watching for file changes.

[13:22:58] File change detected. Starting incremental compilation...

[13:22:58] Found 0 errors. Watching for file changes.

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/mobx-bridge/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/stores/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-desktop/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-electron/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/css/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/config/tsconfig.json'...

[13:23:08] File change detected. Starting incremental compilation...

[13:23:08] Found 0 errors. Watching for file changes.

[13:23:08] File change detected. Starting incremental compilation...

[13:23:08] Found 0 errors. Watching for file changes.

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/mobx-bridge/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/stores/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-desktop/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-electron/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/css/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/config/tsconfig.json'...

[13:23:18] File change detected. Starting incremental compilation...

[13:23:18] Found 0 errors. Watching for file changes.

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/mobx-bridge/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/stores/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-desktop/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-electron/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/css/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/config/tsconfig.json'...

[13:23:28] File change detected. Starting incremental compilation...

[13:23:28] Found 0 errors. Watching for file changes.

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/mobx-bridge/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/stores/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-desktop/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-electron/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/css/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/config/tsconfig.json'...

[13:23:38] File change detected. Starting incremental compilation...

[13:23:38] Found 0 errors. Watching for file changes.

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/mobx-bridge/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/stores/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-desktop/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-electron/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/css/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/config/tsconfig.json'...

[13:23:48] File change detected. Starting incremental compilation...

[13:23:48] Found 0 errors. Watching for file changes.

message TS6358: Building project '/Users/nw/projects/motion/orbit/packages/mobx-bridge/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/stores/tsconfig.json'...

message TS6358: Building project '/Users/nw/projects/motion/orbit/app/orbit-desktop/tsconfig.json'...

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions