-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Fix circular dependencies that pollutes version bump #12495
Fix circular dependencies that pollutes version bump #12495
Conversation
Thanks for making a pull request to jupyterlab! |
Current top circular loop detected by lerna:
|
a7dcf23
to
70f9d2f
Compare
21a4fcb
to
330a454
Compare
Ok indeed this fixes it. Big thanks to @blink1073 🥇 🚀 |
f39d1bf
to
da601a0
Compare
This might look a bit odd and unusual at first since this was not really a pattern used across the lab code base until now. But yeah I am also not sure whether there would be another way to fix the circular dependency without doing something like this. |
Move tests from codeeditor to codemirror This is needed to respect package hierarchy Refactor test to have logical dependencies graph
Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com>
Locally all tests are passing (thanks to the --runInBand option) Hopefully this one can pass on the CI too.
da601a0
to
ece7937
Compare
open: () => { | ||
/* noop */ | ||
} | ||
} as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason for not using the DocumentWidgetOpenerMock
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A miss in the many rebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll push a follow-up PR
* Create @jupyterlab/testing Move tests from codeeditor to codemirror This is needed to respect package hierarchy Refactor test to have logical dependencies graph * Add all test dependencies for coreutils * Internalize retry setup and server start up * Remove testutils from new files * Restore the testutils API as much as possible * Fix tests * Fix debugger tests * Update timeout for flaky test * Fix setup/teardown * Advice to use `runInBand` when running locally * Fix running all tests at once locally * [skip ci] Update docs/source/extension/extension_migration.rst Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com> * Increase timeout for last timed out test Locally all tests are passing (thanks to the --runInBand option) Hopefully this one can pass on the CI too. * Automatic application of license header * Undo custom timeout setting * Apply changes to @jupyterlab/metadataform Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Create @jupyterlab/testing Move tests from codeeditor to codemirror This is needed to respect package hierarchy Refactor test to have logical dependencies graph * Add all test dependencies for coreutils * Internalize retry setup and server start up * Remove testutils from new files * Restore the testutils API as much as possible * Fix tests * Fix debugger tests * Update timeout for flaky test * Fix setup/teardown * Advice to use `runInBand` when running locally * Fix running all tests at once locally * [skip ci] Update docs/source/extension/extension_migration.rst Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com> * Increase timeout for last timed out test Locally all tests are passing (thanks to the --runInBand option) Hopefully this one can pass on the CI too. * Automatic application of license header * Undo custom timeout setting * Apply changes to @jupyterlab/metadataform Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
References
Fix #11630
Fix #5821
We have 2 circular dependencies to break. The major trouble being testutils. We cannot depend on test utils for all packages. But as it is published, we probably needs to keep publishing it although the best approach would be to internalize the utils in each package => This is done by adding a
src/testutils.ts
that is not exposed through thesrc/index.ts
.lerna does not ignore circular dependencies that come from dev dependencies. So when bumping the version it is spreading to far more packages than needed.
Code changes
Create a new package
@jupyterlab/testing
that contains the configuration for babel and jest as well as all helpers for testing@jupyterlab/services
.The helpers in
@jupyterlab/testutils
have been split between the packages in atestutils.ts
file (or folder) that is not directly exported by theirindex
.Some tests have chicken/egg trouble (packages codeeditor, completer and rendermime are using their downstream packages for unit tests 😞) -> the quick solution done here where to move those test files in metapackage.
@jupyterlab/testutils
exports all previous helpers. But they main not be gathered under the same namespace.User-facing changes
N/A
Backwards-incompatible changes
Hopefully few