Skip to content

Comments

cleanup(repo): avoid unnecessary project graph recomputations#34423

Open
leosvelperez wants to merge 3 commits intomasterfrom
repo/prevent-wrong-recomputations
Open

cleanup(repo): avoid unnecessary project graph recomputations#34423
leosvelperez wants to merge 3 commits intomasterfrom
repo/prevent-wrong-recomputations

Conversation

@leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Feb 12, 2026

Current Behavior

  • Cypress start-dev-server.ts file creates a port lock file next to the source code
  • Native temp DB files created by tests are not properly ignored
  • Astro config timestamp file is not ignored

These all trigger watch file change events, which cause the project graph to be recomputed unnecessarily.

Expected Behavior

Output files should not trigger watch file change events. The project graph should not be recomputed unnecessarily.

@leosvelperez leosvelperez self-assigned this Feb 12, 2026
@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 1dfe1a8
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6996c83829c1730008d679d2
😎 Deploy Preview https://deploy-preview-34423--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 1dfe1a8
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6996c83861f1e90008ea0fce
😎 Deploy Preview https://deploy-preview-34423--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Feb 12, 2026

View your CI Pipeline Execution ↗ for commit 1dfe1a8

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ⛔ Cancelled 1h 40m 15s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 4m 5s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 9s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-19 10:07:03 UTC

@leosvelperez leosvelperez force-pushed the repo/prevent-wrong-recomputations branch from a26d737 to 825b00e Compare February 18, 2026 09:44
Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other files are fine. Please remove the changes to .nxignore.

.nxignore Outdated
packages/nx/src/native/index.d.ts
packages/nx/src/native/native-bindings.js

# Workaround for ignore-files crate bug with prefix matching
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We merged the fix for ignore-files

.nxignore Outdated
nx-dev/tutorial/**/templates

# Generated by napi-rs (outputs of build-native)
packages/nx/src/native/index.d.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these are generated but these are also important for hashing.

If we add it to .nxignore, then it will yield false positive cache hits.

Let's not make any changes to this file.

@AgentEnder AgentEnder force-pushed the repo/prevent-wrong-recomputations branch 4 times, most recently from caf8654 to 849a43d Compare February 18, 2026 21:41
- temp-db*/ catches temp-db-cache, temp-db-task variants
- *.config.timestamp* catches all config timestamp files (astro, vite, etc.)

Prevents daemon recomputations from test/build artifacts.
- Ignore index.d.ts and native-bindings.js (napi-rs outputs)
- Ignore **/target/ (Maven/Gradle build outputs)
  - a bug in the `ignore-files` crate cause them to be picked even though they are ignored in the root .gitignore file

These files are build outputs, not inputs to the project graph.
Prevents spurious daemon recomputations during builds.
Port lock files were being written to the source directory, triggering the daemon file watcher and causing unnecessary project graph recomputations during Cypress test runs.

Move lock files to os.tmpdir()/nx-cypress-port-locks/ to avoid this.
@leosvelperez leosvelperez force-pushed the repo/prevent-wrong-recomputations branch from 849a43d to 1dfe1a8 Compare February 19, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants