Nx: affected: all workspace projects are run when touching workspace.json

Created on 19 May 2020  路  2Comments  路  Source: nrwl/nx

Expected Behavior

nothing is being executed when touching files not defined within implicitDependencies

Current Behavior

nx.json

{
  "npmScope": "myproject",
  "implicitDependencies": {
    "package.json": {
      "dependencies": "*",
      "devDependencies": "*"
    },
    "tsconfig.json": "*",
    ".eslintrc.js": "*"
  }

If I generate new lib or manually touch workspace.json or nx.json all projects within workspace are run when executing affected

  • Is workspace.json and nx.json now set as default implicitDep no matter what?

    • this is too bad as on every new lib/app generation, CI will have hard time :)

Context

  @nrwl/angular : Not Found
  @nrwl/cli : 9.3.0
  @nrwl/cypress : 9.3.0
  @nrwl/eslint-plugin-nx : 9.3.0
  @nrwl/express : Not Found
  @nrwl/jest : 9.3.0
  @nrwl/linter : 9.3.0
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : 9.3.0
  @nrwl/react : 9.3.0
  @nrwl/schematics : Not Found
  @nrwl/tao : 9.3.0
  @nrwl/web : 9.3.0
  @nrwl/workspace : 9.3.0
  typescript : 3.8.3
core stale question / discussion

Most helpful comment

You can opt into more intelligent processing of changes to workspace.json and nx.json by removing theimplicitDependencies as you did.

If you generate a new lib, it should only affect the new generated lib. If you touch a field that's outside of projects though, it will affect everything. Such as removing the implicitDependencies from nx.json. You should commit those changes first. I got caught by this many times too. :wink:

@Hotell let me know if this fulfills your expected behavior.

All 2 comments

You can opt into more intelligent processing of changes to workspace.json and nx.json by removing theimplicitDependencies as you did.

If you generate a new lib, it should only affect the new generated lib. If you touch a field that's outside of projects though, it will affect everything. Such as removing the implicitDependencies from nx.json. You should commit those changes first. I got caught by this many times too. :wink:

@Hotell let me know if this fulfills your expected behavior.

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 馃檹

Was this page helpful?
0 / 5 - 0 ratings