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

Little regression in run command with useNx: true #3336

Closed
ruggi99 opened this issue Sep 21, 2022 · 3 comments
Closed

Little regression in run command with useNx: true #3336

ruggi99 opened this issue Sep 21, 2022 · 3 comments

Comments

@ruggi99
Copy link

ruggi99 commented Sep 21, 2022

Current Behavior

I don't have a nx.json file.

With lerna 5.5.2 if I run npx lerna run build for example it doesn't run in topological order (so dependencies before dependents) but runs in parallel mode. I tried also using --include-dependencies and still works in parallel mode.

With lerna 5.4.3 it used to run in topological order even if nx.json file was not present. No parallel mode unless specified.

I saw this PR that changed this behavior #3316.

My question is:
Is that by design?

If I have never got a nx.json file and I use "useNx": true in lerna.json, is it right to run in parallel mode instead of topological order by default (as said in previous version it wasn't like this)?

Thanks

Expected Behavior

I think it's a little regression.
I expect run command to run in topological order if "useNx": true in lerna.json and no nx.json file.
Also because in the PR it is stated that the current behaviour should be preserved, if I haven't misread

Steps to Reproduce

Create a project with 3 packages. The first with no dependencies, the others with the first ads dependence. Use lerna.json file as above. If I run a script (above there's an example) in all three packages I would expect to run the script in the first package and then in the others.

Failure Logs / Configuration

lerna.json

{
  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "useNx": true,
  "useWorkspaces": true,
  "version": "0.7.0"
}

Environment

System:
OS: Windows 10 10.0.19044
CPU: (6) x64 AMD FX(tm)-6300 Six-Core Processor
Binaries:
Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.15.1 - C:\Program Files\nodejs\npm.CMD
Utilities:
Git: 2.37.2.
npmPackages:
lerna: ^5.4.3 => 5.5.2

@alasdairhurst
Copy link

I saw this error as well. Fixed by adding nx.json

But it seems in the latest version (5.5.4) even with an nx.json file created, it now runs in alphabetical order again, rather than respecting the dependencies and implicitDependencies.

@ruggi99
Copy link
Author

ruggi99 commented Sep 29, 2022

I temporarily fixed this issue the same day I opened this.
I forgot to update the issue.
I fixed by disabling entirely nx in lerna.json file.

Didn't want to learn nx so just disabled it and went ahead

@ruggi99
Copy link
Author

ruggi99 commented Sep 30, 2022

Now with version v5.6.0 this regression seems to be fixed.

@ruggi99 ruggi99 closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants