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

18.1.0 breaks forwardAllArgs argument #22385

Closed
1 of 4 tasks
rejas opened this issue Mar 19, 2024 · 6 comments
Closed
1 of 4 tasks

18.1.0 breaks forwardAllArgs argument #22385

rejas opened this issue Mar 19, 2024 · 6 comments
Assignees
Labels

Comments

@rejas
Copy link

rejas commented Mar 19, 2024

Current Behavior

I have this executor:

"typecheck": {
  "executor": "nx:run-commands",
  "options": {
    "commands": ["tsc -p tsconfig.lib.json --noEmit"],
    "cwd": "libs/services",
    "forwardAllArgs": false
  }
},

With 18.1.0 I get for when doing nx run services:typecheck

error TS5023: Unknown compiler option '--forwardAllArgs'.
Warning: command "tsc -p tsconfig.lib.json --noEmit --forwardAllArgs false" exited with non-zero status code


 NX   Ran target typecheck for project services (416ms)

   ✖  1/1 failed
   ✔  0/1 succeeded [0 read from cache]

Expected Behavior

With 18.0.8 I get no error:

> nx run services:typecheck

 NX   Successfully ran target typecheck for project services (2s)

Process finished with exit code 0

GitHub Repo

No response

Steps to Reproduce

  1. Update to nx 18.1
  2. Run typecheck executor

Nx Report

NX   Report complete - copy this into the issue template

Node   : 18.19.0
OS     : darwin-arm64
pnpm   : 8.15.5

nx (global)        : 18.1.2
nx                 : 18.1.2
@nx/js             : 18.1.2
@nx/jest           : 18.1.2
@nx/eslint         : 18.1.2
@nx/workspace      : 18.1.2
@nx/devkit         : 18.1.2
@nx/eslint-plugin  : 18.1.2
@nx/next           : 18.1.2
@nx/playwright     : 18.1.2
@nx/react          : 18.1.2
@nx/storybook      : 18.1.2
@nx/vite           : 18.1.2
typescript         : 5.3.3
---------------------------------------
Community plugins:
nx-stylelint : 17.1.4

Failure Logs

No response

Package Manager Version

No response

Operating System

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

Additional Information

No response

@francescocaveglia
Copy link

this syntax works:

"typecheck": {
  "executor": "nx:run-commands",
  "options": {
    "commands": [
      {
        "command": "tsc -p tsconfig.lib.json --noEmit",
        "forwardAllArgs": false
      }
    ],
    "cwd": "libs/services"
  }
},

@rejas
Copy link
Author

rejas commented Mar 19, 2024

Thanks, this works indeed. Any idea/reason why the syntax changed with 18.1?

@FrozenPandaz FrozenPandaz added the scope: core core nx functionality label Mar 27, 2024
@FrozenPandaz
Copy link
Collaborator

We didn't change the syntax but I the handling of which options are forwarded to the command has changed. We will be fixing the change in behavior.

@xiongemi
Copy link
Collaborator

xiongemi commented Apr 9, 2024

forwardAllArgs is an option under options.commands as shown in https://nx.dev/nx-api/nx/executors/run-commands. as mentioned above, it is not directly under options.
there was a change where any unknown options will be passed to the underlying command.

closing this issue for now.

@xiongemi xiongemi closed this as completed Apr 9, 2024
@xiongemi
Copy link
Collaborator

xiongemi commented Apr 9, 2024

i think it is related to #22025. currently there is no top level forwardAllArgs

Copy link

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 May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants