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

--exclude-current also excludes dependencies #227

Open
occidens opened this issue Jul 28, 2022 · 0 comments
Open

--exclude-current also excludes dependencies #227

occidens opened this issue Jul 28, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@occidens
Copy link

Describe the bug
The --exclude-current switch causes yarn.build to also exclude the dependencies of the current workspace. This does not appear to be the intended functionality based on the description in the docs

# For Dev
# this one is really useful at the start of a dev command or similar where you
# are watching for changes in the current workspace but need to ensure your
# dependencies are built
yarn build --exclude-current

In the scenario described, for typical monorepo setup, the --exclude-current results in nothing being built.

To Reproduce

# Using the examples in this repo, with a fresh checkout:
$ cd packages/examples/lorem-ipsum

$ yarn build --dry-run
# Shows 12 packages to be built

$ yarn build --dry-run --exclude-current
# Shows 0 packages to be build; expected 11

$ yarn build --exclude-current
# Shows 1 package excluded, 0 packages built or skipped

$ yarn build
# Successfully builds 12 packages

Expected behavior
Based on the description in the docs, I would expect yarn build --exclude-current to build the same set of packages as yarn build, minus the current workspace.

Screencast of the above repoduction
https://asciinema.org/a/511484

Desktop:

  • OS: macOS 11.6.7 Darwin Kernel Version 20.6.0: Tue Apr 19 21:04:45 PDT 2022; root:xnu-7195.141.29~1/RELEASE_X86_64 x86_64
  • node: 16.13.0
  • yarn: 3.2.1
@occidens occidens added the bug Something isn't working label Jul 28, 2022
@ojkelly ojkelly self-assigned this Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants