Skip to content
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

fix(core): prevent graph output from being truncated #23446

Merged
merged 2 commits into from
May 31, 2024

Conversation

AgentEnder
Copy link
Member

@AgentEnder AgentEnder commented May 16, 2024

Current Behavior

--graph stdout and --file stdout aren't documented. When printing graph to stdout, its possible for some output to get missed.

Expected Behavior

Existing flags are documented, and --print is more discoverable. We await stdout finishing before exiting the program.

Related Issue(s)

Fixes #18689

Copy link

vercel bot commented May 16, 2024

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

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview May 29, 2024 9:26pm

@@ -65,6 +65,24 @@ Use the currently executing project name in your command.:
nx affected -t build --tag=$NX_TASK_TARGET_PROJECT:latest
```

Preview the task graph that Nx would run inside a webview.:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Preview the task graph that Nx would run inside a webview.:
Preview the task graph that Nx would run inside a webview:

Please fix this everywhere

@@ -53,13 +53,13 @@ Show affected projects in the workspace, excluding end-to-end projects:
nx show projects --affected --exclude=*-e2e
```

Show detailed information about "my-app" in a json format.:
Show detailed information about "my-app" in a json format:

```shell
nx show project my-app
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please make sure this is correct..

Print the project graph as JSON to the console:

```shell
nx graph --file=stdout
Copy link
Collaborator

Choose a reason for hiding this comment

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

Only show --print

@AgentEnder AgentEnder force-pushed the fix/graph-output-shouldnt-be-truncated branch 2 times, most recently from 5b9cd52 to 03685f9 Compare May 24, 2024 18:33
@@ -89,7 +95,7 @@ Exclude certain projects from being processed

Type: `string`

Output file (e.g. --file=output.json or --file=dep-graph.html)
Output file (e.g. --file=output.json or --file=dep-graph.html). Provide --file=stdout to print the project graph in the terminal.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's not recommend this.


Type: `boolean`

Print the project graph in the terminal. (equivalent to --file=stdout)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we have to mention that it's equivalent?

@FrozenPandaz FrozenPandaz merged commit a308e1d into master May 31, 2024
6 checks passed
@FrozenPandaz FrozenPandaz deleted the fix/graph-output-shouldnt-be-truncated branch May 31, 2024 22:05
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.

Get nx graph data via stdout
3 participants