Skip to content

chore(nx-dev): use continuous tasks in nx-dev #31127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

isaacplmann
Copy link
Collaborator

Update nx-dev and tutorial tasks to use continuous tasks

@isaacplmann isaacplmann requested a review from jaysoo May 8, 2025 16:13
Copy link

vercel bot commented May 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview May 15, 2025 6:16pm

Copy link

nx-cloud bot commented May 8, 2025

View your CI Pipeline Execution ↗ for commit 98d94ec.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 7m 8s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 12s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 6s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗
nx documentation ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-15 18:16:58 UTC

Copy link
Member

@juristr juristr left a comment

Choose a reason for hiding this comment

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

Cool, was just running the docs locally and thought we should def update it to the new continuous tasks! Thanks

Comment on lines +8 to +9
"dependsOn": ["sitemap"],
"command": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/documentation/internal-link-checker.ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

The change introduces a circular dependency in the task execution flow. Currently:

  • build depends on sitemap
  • sitemap depends on build-base

This creates a cycle that differs from the original execution order where build depended on build-base first, then ran the sitemap command.

To maintain the original execution order while using the new continuous task format, consider changing the dependency to:

"dependsOn": ["build-base"]

Then have the sitemap task run before the link checker command, or include both commands in sequence.

Suggested change
"dependsOn": ["sitemap"],
"command": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/documentation/internal-link-checker.ts",
"dependsOn": ["build-base"],
"command": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/documentation/internal-link-checker.ts",

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

"serve": {
"executor": "@nx/next:server",
"dependsOn": ["copy-docs", "copy-tutorial"],
"dependsOn": ["copy-docs", "copy-tutorial", "watch-docs"],
Copy link
Contributor

Choose a reason for hiding this comment

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

The serve target depends on the continuous task watch-docs, which by design never completes. This dependency structure may prevent the serve target from executing properly, as it will wait for watch-docs to complete before proceeding.

Consider one of these alternatives:

  1. Remove watch-docs from the dependency list and start both tasks in parallel using a parent task
  2. Use the "parallel": true option in the dependency configuration
  3. Restructure the workflow so that watch-docs runs independently

This ensures both tasks can run simultaneously without blocking each other.

Suggested change
"dependsOn": ["copy-docs", "copy-tutorial", "watch-docs"],
"dependsOn": [{"projects": ["copy-docs", "copy-tutorial", "watch-docs"], "parallel": true}],

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

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.

3 participants