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

update lerna, to fix issue with cyclic dependencies #11581

Closed
wants to merge 1 commit into from

Conversation

zxbodya
Copy link
Contributor

@zxbodya zxbodya commented May 18, 2020

Because of a bug in Lerna some cyclic dependencies are installed from npm instead of linking to package in monorepo.

The bug was fixed here: lerna/lerna#2380

This is needed in the context of migration to typescript #11578 (which would not be blocked because of the bug).

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? Yes, Lerna was updated
License MIT

because of bug in lerna some dependencies might be installed from npm instead of linking to package in monorepo
fix: lerna/lerna#2380
@zxbodya
Copy link
Contributor Author

zxbodya commented May 18, 2020

affected packages:

lerna WARN ECYCLE Dependency cycles detected, you should fix these!
lerna WARN ECYCLE @babel/compat-data -> @babel/helper-compilation-targets -> @babel/compat-data
lerna WARN ECYCLE @babel/core -> @babel/helper-module-transforms -> @babel/helper-module-imports -> @babel/core
lerna WARN ECYCLE @babel/generator -> @babel/types -> @babel/generator
lerna WARN ECYCLE @babel/helper-plugin-test-runner -> @babel/helper-transform-fixture-test-runner -> (nested cycle: @babel/core -> @babel/helper-module-transforms -> @babel/helper-module-imports -> @babel/core) -> @babel/helpers -> @babel/helper-plugin-test-runner
lerna WARN ECYCLE @babel/helper-replace-supers -> @babel/traverse -> (nested cycle: @babel/helper-plugin-test-runner -> @babel/helper-transform-fixture-test-runner -> (nested cycle: @babel/core -> @babel/helper-module-transforms -> @babel/helper-module-imports -> @babel/core) -> @babel/helpers -> @babel/helper-plugin-test-runner) -> @babel/helper-replace-supers
lerna WARN ECYCLE (nested cycle: @babel/helper-replace-supers -> @babel/traverse -> (nested cycle: @babel/helper-plugin-test-runner -> @babel/helper-transform-fixture-test-runner -> (nested cycle: @babel/core -> @babel/helper-module-transforms -> @babel/helper-module-imports -> @babel/core) -> @babel/helpers -> @babel/helper-plugin-test-runner) -> @babel/helper-replace-supers) -> (nested cycle: @babel/helper-replace-supers -> @babel/traverse -> (nested cycle: @babel/helper-plugin-test-runner -> @babel/helper-transform-fixture-test-runner -> (nested cycle: @babel/core -> @babel/helper-module-transforms -> @babel/helper-module-imports -> @babel/core) -> @babel/helpers -> @babel/helper-plugin-test-runner) -> @babel/helper-replace-supers)

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cf048bd:

Sandbox Source
exciting-kalam-blshz Configuration
fervent-liskov-18q0h Configuration

@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/22284/

@nicolo-ribaudo
Copy link
Member

I have to test that this doesn't break our publishing process (I don't fully trust it 😂)

@nicolo-ribaudo
Copy link
Member

This PR doesn't include the bugfix, because we are relying on https://github.com/babel/lerna/tree/readme. I'm updating it.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented May 23, 2020

Actually, we completely overwrite (and mostly delete) the code containing the bugfix, so I don't understand how this PR could affect us 🤔

@zxbodya
Copy link
Contributor Author

zxbodya commented May 23, 2020

Actually, we completely overwrite (and mostly delete) the code containing the bugfix, so I don't understand how this PR could affect us 🤔

double-checked it… it is indeed exactly the same…

but still there are some dependencies that are installed instead of being linked, so I am not really sure why this does not affect tsc type check anymore…

I definitely had issues earlier because of using babel types from @types/* instead of code in a repo, initially I was fixing it by moving some dependencies to peerDependencies to avoid having issue and a warning from lerna(which might be not quite correct, but fixed the issue for me), but later I tried new lerna version which happend to work fine… and so I removed that change, instead adding lerna version bump…


here is list of dependencies that might be not linked correctly(some indeed should be installed from npm):

packages/babel-helper-transform-fixture-test-runner/node_modules/@babel:
 generator
 helper-function-name
 helper-get-function-arity
 helper-member-expression-to-functions
 helper-module-imports
 helper-module-transforms
 helper-optimise-call-expression
 helper-plugin-utils
 helper-replace-supers
 helper-simple-access
 helper-split-export-declaration
 helper-validator-identifier
 helpers
 highlight
 parser
 plugin-syntax-object-rest-spread
 template
 traverse
 types

packages/babel-plugin-proposal-async-generator-functions/node_modules/@babel:
 plugin-syntax-async-generators

packages/babel-plugin-proposal-dynamic-import/node_modules/@babel:
 plugin-syntax-dynamic-import

packages/babel-plugin-proposal-export-namespace-from/node_modules/@babel:
 plugin-syntax-export-namespace-from

packages/babel-plugin-proposal-json-strings/node_modules/@babel:
 plugin-syntax-json-strings

packages/babel-plugin-proposal-logical-assignment-operators/node_modules/@babel:
 plugin-syntax-nullish-coalescing-operator

packages/babel-plugin-proposal-nullish-coalescing-operator/node_modules/@babel:
 plugin-syntax-nullish-coalescing-operator

packages/babel-plugin-proposal-object-rest-spread/node_modules/@babel:
 plugin-syntax-object-rest-spread

packages/babel-plugin-proposal-optional-catch-binding/node_modules/@babel:
 plugin-syntax-optional-catch-binding

packages/babel-plugin-proposal-optional-chaining/node_modules/@babel:
 plugin-syntax-optional-chaining

packages/babel-plugin-transform-modules-commonjs/node_modules/@babel:
 plugin-syntax-object-rest-spread

packages/babel-plugin-transform-modules-systemjs/node_modules/@babel:
 plugin-syntax-dynamic-import

packages/babel-plugin-transform-regenerator/node_modules/@babel:
 runtime

packages/babel-preset-env/node_modules/@babel:
 helper-annotate-as-pure
 helper-create-regexp-features-plugin
 helper-regex
 helper-validator-identifier
 plugin-syntax-async-generators
 plugin-syntax-dynamic-import
 plugin-syntax-json-strings
 plugin-syntax-nullish-coalescing-operator
 plugin-syntax-object-rest-spread
 plugin-syntax-optional-catch-binding
 plugin-syntax-optional-chaining
 preset-modules

packages/babel-standalone/node_modules/@babel:
 plugin-syntax-async-generators
 plugin-syntax-object-rest-spread
 plugin-syntax-optional-catch-binding

@nicolo-ribaudo
Copy link
Member

I'm working on using Yarn 2 in the next-8-dev branch, so when it's merged we could check it using Yarn instead of Lerna solves the problem.

@zxbodya
Copy link
Contributor Author

zxbodya commented Sep 6, 2020

yarn 2 is already here, and I do not see the original issue anymore, and so - this is no longer relevant

@zxbodya zxbodya closed this Sep 6, 2020
@zxbodya zxbodya deleted the update-lerna branch September 6, 2020 13:23
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Dec 7, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Dependency ⬆️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants