Closed zjkipping closed 1 year ago
The easier workaround would be to add _tools
to your .nxignore
file. This will ignore the projects and files in that directory. That should solve your issues.
FYI, the workspace.json
in the root of your repo is not ignored. Rather, other projects are also being detected and added to the graph as well.
I added a note in the 15.0.0
release notes: https://github.com/nrwl/nx/releases/tag/15.0.0
Hopefully that solves your issues?
@FrozenPandaz Yes, that worked perfectly. Thank you! Didn't realize that existed. Easy to google for once you know the file exists 😄
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.
Current Behavior
When running any nx
affected
orrun-many --all
command the globbing for projects is too wide on v15+ (which deprecated the workspace.json). It currently pulls in everything that would have been in the workspace.json + any nested angular apps/nx workspaces (with apps/libs) it can find.Even if you leave the root workspace.json the
nx affected
seems to ignore it completely, which isn't very backwards compatible. We are hoping to remove this file as well, but will take a little bit to transition.Expected Behavior
The globbing should only look for the projects in the
apps
andlibs
(possibly tools?) directories by default with an override inside the nx.json.I assume the globbing checks for any sub
workspace.json
,angular.json
, orproject.json
files anywhere inside the workspace.Steps to Reproduce
We have a few top level folders that culminate with a template angular application and also a template nx workspace. We use these for easily making adjustments to our own internal systems that run around nx when upgrading nx/angular.
The folder structure would looking something like the below (slightly flattened):
With the above setup an
nx affected
command picks up all the projects in the root apps & libs folder, BUT it also picks up the below in the_tools
folder:template-workspace
(??)app-example
,app-example-e2e
, andlib-example
contained in thetemplate-workspace
template-angular
angular app with anangular.json
fileIf I have some time I will try and reproduce this in a public repo.
Workaround
We currently are adding
--exclude=app-example,app-example-e2e,lib-example,template-workspace,template-angular
at the end of all of ourrun-many --all
andaffected
commands. Apparently adding the--exclude
completely ignores caching though so this isn't a great solution...Failure Logs
Nothing fails really other than the nested workspace/projects/angular apps that get picked up. More than likely due to mis-matching versions or anything else since they shouldn't be run in the first place.
Environment
Node : 18.12.0 OS : win32 x64 yarn : 1.22.5
nx : 15.0.7 @nrwl/angular : 15.0.7 @nrwl/cypress : 15.0.7 @nrwl/detox : Not Found @nrwl/devkit : 15.0.7 @nrwl/esbuild : Not Found @nrwl/eslint-plugin-nx : 15.0.7 @nrwl/expo : Not Found @nrwl/express : Not Found @nrwl/jest : 15.0.7 @nrwl/js : 15.0.7 @nrwl/linter : 15.0.7 @nrwl/nest : 15.0.7 @nrwl/next : Not Found @nrwl/node : 15.0.7 @nrwl/nx-cloud : 15.0.2 @nrwl/nx-plugin : Not Found @nrwl/react : Not Found @nrwl/react-native : Not Found @nrwl/rollup : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 15.0.7 @nrwl/web : Not Found @nrwl/webpack : 15.0.7 @nrwl/workspace : 15.0.7 typescript : 4.8.4
Local workspace plugins:
Community plugins: @ngrx/data: 14.3.2 @ngrx/effects: 14.3.2 @ngrx/entity: 14.3.2 @ngrx/router-store: 14.3.2 @ngrx/store: 14.3.2 @ngrx/store-devtools: 14.3.2 @ngrx/schematics: 14.3.2