nstudio / xplat

Cross-platform (xplat) tools for Nx workspaces.
MIT License
366 stars 52 forks source link

[Question]: Does nx:affected work with xplat #196

Closed barryajones closed 3 years ago

barryajones commented 4 years ago

I posted on stackoverflow a few days ago but thought I might get more luck here?

I have a nx workspace with the xplat schematics. We have built out our feature components using the xplat architecture. We have several apps that are composed of the xplat feature components.

I would like to use the nx:affected:build command to only build the apps that are affected by the last commit in an nx/xplat workspace.

Let's say I have 2 angular web apps web-app1 and web-app2.

.
├── apps
│   ├── web-app1
│   └── web-app2
├── libs
│   ├── core
│   └── features
│       └── app1
│       └── app2
└── xplat
    └── web
        └── features
            └── app1
            └── app2

When I make a change to /xplat/web/app1 I would expect the nx:affected:apps command to only show the web-app1 app. However nx thinks that the commit affects both apps. (web-app2 does not import the app1 feature.)

gitdiff

nx affected:apps --base=head~1 --head=head

affected-output

I've created a sample repo to demonstrate: https://github.com/barryajones/workspace-affected-test

Original Stackoverflow question: https://stackoverflow.com/questions/61979423/running-nxaffected-with-an-xplat-workspace

barryajones commented 4 years ago

Relates to #158

NathanWalker commented 3 years ago

This works now with v11