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

missaligned padding for terminal output with failed tasks #23115

Closed
1 of 4 tasks
Den-dp opened this issue May 1, 2024 · 2 comments · Fixed by #23119
Closed
1 of 4 tasks

missaligned padding for terminal output with failed tasks #23115

Den-dp opened this issue May 1, 2024 · 2 comments · Fixed by #23119

Comments

@Den-dp
Copy link
Contributor

Den-dp commented May 1, 2024

Current Behavior

When running multiple targets like nx run-many -t lint, the first task (- nx run bar:lint) doesn't look properly padded:

 NX   Ran target lint for 3 projects (3s)

   √  0/3 succeeded [0 read from cache]

   ×  3/3 targets failed, including the following:

      - nx run bar:lint
       - nx run baz:lint
       - nx run foo:lint

Expected Behavior

here is how it was aligned in nx@17

 >  NX   Ran target lint for 3 projects (3s)                                                                                                                                                                                      
                                                                                                                                                                                                                                  
    √    0/3 succeeded [0 read from cache]                                                                                                                                                                                        
                                                                                                                                                                                                                                  
    ×    3/3 targets failed, including the following:                                                                                                                                                                             
         - nx run bar:lint
         - nx run foo:lint
         - nx run baz:lint

GitHub Repo

No response

Steps to Reproduce

npx create-nx-workspace@18 nx18
npx nx generate library foo
npx nx generate library bar
npx nx generate library baz
nx run-many -t lint

Nx Report

> nx report

 NX   Report complete - copy this into the issue template

Node   : 20.12.2
OS     : win32-x64
npm    : 10.7.0

nx (global)        : 18.3.4
nx                 : 18.3.4
@nx/js             : 18.3.4
@nx/jest           : 18.3.4
@nx/linter         : 18.3.4
@nx/eslint         : 18.3.4
@nx/workspace      : 18.3.4
@nx/devkit         : 18.3.4
@nx/eslint-plugin  : 18.3.4
@nrwl/tao          : 18.3.4
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Might be related to #22189 #21809

@Den-dp Den-dp changed the title terminal output padding is missaligned missaligned padding for terminal output with failed tasks May 1, 2024
@Den-dp
Copy link
Contributor Author

Den-dp commented May 1, 2024

Looks like the space in .join('\n ') became redundant over time and might be removed in order to fix the issue:

`${failedTasksForPrinting
.map(
(t) =>
`${EXTENDED_LEFT_PAD}${output.colors.red(
'-'
)} ${output.formatCommand(t.toString())}`
)
.join('\n ')}`,

Copy link

github-actions bot commented Jun 1, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant