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

affected:build --all does not consider dependency graph / implicitDependencies #1302

Closed
4 tasks done
dherges opened this issue Apr 28, 2019 · 3 comments · Fixed by #1317
Closed
4 tasks done

affected:build --all does not consider dependency graph / implicitDependencies #1302

dherges opened this issue Apr 28, 2019 · 3 comments · Fixed by #1317
Labels

Comments

@dherges
Copy link
Contributor

dherges commented Apr 28, 2019

Prerequisites

Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

Reproduction repo: https://github.com/dherges/nx-affects-build-implicit-deps

{
  "projects": {
    "foobar": {
      "tags": [],
      "implicitDependencies": ["shared"]
    },
    "shared": {
      "tags": []
    }
  }
}
$ ./node_modules/.bin/nx affected:build --all
Running build for projects:
  foobar,
  shared
Running build for shared
Running build for foobar
Running build for affected projects succeeded.

Current Behavior

$ ./node_modules/.bin/nx affected:build --all
Running build for projects:
  foobar,
  shared
Running build for foobar
Running build for shared
Running build for affected projects succeeded.

Failure Information (for bugs)

The dependency graph should be considered to determine the order which project needs to be built prior to satisfy dependencies of another project.

Screen Shot 2019-04-28 at 19 10 42

Steps to Reproduce

Reproduction repo: https://github.com/dherges/nx-affects-build-implicit-deps

Edit nx.json to add implicit dependencies

Context

The order of implicit dependencies becomes an issue when static resources are generated from a library project. Generated resources should then be consumed by an app, e.g. added to the assets configuration in nagular.json.

One real-world example is:

  • generate an icon font from set of svg files
  • icon font is added as library project to nx workspace, w/ run command builder
  • app project should be able to consume generated icon font files, add implicit dependencies to library project
  • if projects are not built in correct order and app is unable to consume library's generated resource files, the app's build fails

Failure Logs

see above

Other

see above

@dherges dherges changed the title affected:build --all does not consider implicitDependencies affected:build --all does not consider dependency graph / implicitDependencies Apr 28, 2019
@dherges
Copy link
Contributor Author

dherges commented May 1, 2019

Current behaviour of affected:build --base=[SHA] --head=[SHA] is:

$ yarn affected:build --base=$(git rev-parse HEAD~1) --head=$(git rev-parse HEAD)
yarn run v1.15.2
$ ./node_modules/.bin/nx affected:build --base=cc45369be04e2a9425bb8eb91bdc91520095cbcc --head=5626d04aa607811cfba523959203d18c3f7b24be
Running build for projects:
  shared,
  foobar
Running build for shared
Running build for foobar
Running build for affected projects succeeded.

dherges added a commit to dherges/nx that referenced this issue May 1, 2019
Closes nrwl#1302

Aligns behaviour of `affected --base=[SHA] --head=[SHA]` and `affected --all`
dherges added a commit to dherges/nx that referenced this issue May 1, 2019
Closes nrwl#1302

Aligns behaviour of `affected --base=[SHA] --head=[SHA]` and `affected --all`
dherges added a commit to dherges/nx that referenced this issue May 1, 2019
…l` in v7

Closes nrwl#1302

Aligns behaviour of `affected --base=[SHA] --head=[SHA]` and `affected --all`
@dherges
Copy link
Contributor Author

dherges commented May 1, 2019

Pull Request for Nx 7: #1318

Pull Request for Nx 8: #1317

vsavkin pushed a commit that referenced this issue May 2, 2019
…l` in v7

Closes #1302

Aligns behaviour of `affected --base=[SHA] --head=[SHA]` and `affected --all`
vsavkin pushed a commit that referenced this issue May 2, 2019
Closes #1302

Aligns behaviour of `affected --base=[SHA] --head=[SHA]` and `affected --all`
@github-actions
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 Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant