Lifecycle adjustments - #939
Conversation
|
@CGNonofr I know this is a beast. The wrapper is gone. Everything apart from the react component is back in I have spent some effort to re-write unit tests for the react component. The life cycle issues should be gone and the tests prove that (at least that's my current hope 🙂) |
|
beast is probably an understatement ^^ I don't think I will be able to add any value reviewing this :-\ except maybe typos? |
What about playing around with /checking the examples and focusing on the usability of the API and the meaningfulness of the tests. |
Is it urgent? I probably won't have the time today, and tomorrow is off |
|
No urgency, I would like to have your feedback / opinion. I will release next versions. This anyway goes back to the dev branch and not yet to main. |
|
We can release maintenance builds from main. This is the future, but it won't be ready before August. Time restrictions / vacaction on my end as well. |
|
Next releases are available. The api changed substantially. moanco-editor-wrapper is gone, but oveall fuctionality is still there. Check the examples and tests before proceeding. This is for evaluation purpose and not intended for production: |
|
I'm going to start digging into this one a bit today, but I'll definitely need some time to go over it. I think I can get back with a concrete review tomorrow sometime. |
- Remove monacp-editor-wrapper. Create EditorApp in client - Move languageclient management from wrapper to client - move all tests from wrapper to client - client: proper separation of sub-exports, rename tools to common - monaco-vscode-api independent config and init - clean up and restructure src and test - Update vitest and other dependencies - Update examples - Unify json, eclipse.jdt and groovy example - react component: fix re-render and global init - expand react tests - LanguageClient handling with react component
b6b20f1 to
ae18e6b
Compare
|
@montymxb the rebase was completed successfully. The tests in GHA actions are suddenly unstable. They work locally. I will see if I can understand where the problem comes from. That should not stop you, though. |
ae18e6b to
90c7dcc
Compare
…es to monaco-editor-wrapper where applicable - Updated test timeout and vite optimizeDeps
90c7dcc to
1898cb1
Compare
There was a problem hiding this comment.
Alright really big PR to review, so I would consider this an initial pass with some points & suggestions. Overall the refactor looks to be good in terms of separating responsibilities that were previously co-mingled, but there's a lot of complexity present with the state management logic.
We should definitely include a migration guide as well as new docs about how to setup an editor using the new approach outlined here. I would be on board to help with that, time permitting.
|
Adding a CoPilot review as well to see if anything else comes up that I missed on the first pass. |
There was a problem hiding this comment.
Pull Request Overview
This PR performs a major architectural refactoring to remove the monaco-editor-wrapper package and consolidate its functionality into the client package. The changes involve moving EditorApp functionality, language client management, and testing to the client, while updating examples and components to use the new structure.
Key changes:
- Removes the entire
monaco-editor-wrapperpackage and consolidates EditorApp functionality into the client - Moves language client management from wrapper to client with a new manager architecture
- Updates all examples to use the unified configuration approach and removes duplicate implementations
- Restructures React component to work directly with monaco-languageclient instead of the wrapper
Reviewed Changes
Copilot reviewed 119 out of 123 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Updated test timeout and reorganized test include patterns to reflect new package structure |
| vite.config.ts | Removed extensive monaco-vscode package includes and simplified to core dependencies |
| packages/wrapper/* | Complete removal of monaco-editor-wrapper package including all source, tests, and configuration |
| packages/wrapper-react/src/index.tsx | Major rewrite to use EditorApp, LanguageClientsManager, and MonacoVscodeApiWrapper directly |
| packages/examples/src/*/client/main.ts | Updated all example clients to use unified configuration approach |
| packages/examples/src/common/client/extendedClient.ts | New shared client implementation for common example patterns |
7680a7e to
124b3d2
Compare
|
@montymxb I have completed the review comment implementation. Do you agree with the following? #939 (comment) I still have no idea why the build pipeline aborts the test. Everything is smooth locally. |
124b3d2 to
77fb166
Compare
|
@CGNonofr do you have any idea why the build pipeline gets cancelled? it is always the same error. For example see here: https://github.com/TypeFox/monaco-languageclient/actions/runs/17034213574/job/48282985642 Honestly, I have no idea right now. Web searches did reveal the issue is not new and this sort of cancellation happened before in other projects, but I don't understand why it suddenly happens here. Test locally are stable on this branch. Some timing/worker issue are actually gone/better here than on main. 🤷♂️ |
Since it happens after exactly 1 minute, I would say a timeout somewhere? |
That is a coincidence. In other runs it gets cancelled after 1m5s oder longer. The problem only occurs on this branch not on main. It must somehow be related to the test changes, but don't understand yet how. |
cb5d419 to
b233e29
Compare
…aywright/Chromium)
b233e29 to
b6f9300
Compare
- Remove monaco-editor-wrapper. Create EditorApp in client - Move languageclient management from wrapper to client - move all tests from wrapper to client - client: proper separation of sub-exports, rename tools to common - monaco-vscode-api independent config and init - clean up and restructure src and test - Update vitest and other dependencies - Update examples - Unify json, eclipse.jdt and groovy example - react component: fix re-render and global init - expand react tests - LanguageClient handling with react component - Updated versions to next.1 and updated dependencies. Removed references to monaco-editor-wrapper where applicable - Updated test timeout and vite optimizeDeps - Implemented review comments - GHA: Properly dispose editor app in tests (saves lots of memory in Playwright/Chromium)
- Remove monaco-editor-wrapper. Create EditorApp in client - Move languageclient management from wrapper to client - move all tests from wrapper to client - client: proper separation of sub-exports, rename tools to common - monaco-vscode-api independent config and init - clean up and restructure src and test - Update vitest and other dependencies - Update examples - Unify json, eclipse.jdt and groovy example - react component: fix re-render and global init - expand react tests - LanguageClient handling with react component - Updated versions to next.1 and updated dependencies. Removed references to monaco-editor-wrapper where applicable - Updated test timeout and vite optimizeDeps - Implemented review comments - GHA: Properly dispose editor app in tests (saves lots of memory in Playwright/Chromium)
- Remove monaco-editor-wrapper. Create EditorApp in client - Move languageclient management from wrapper to client - move all tests from wrapper to client - client: proper separation of sub-exports, rename tools to common - monaco-vscode-api independent config and init - clean up and restructure src and test - Update vitest and other dependencies - Update examples - Unify json, eclipse.jdt and groovy example - react component: fix re-render and global init - expand react tests - LanguageClient handling with react component - Updated versions to next.1 and updated dependencies. Removed references to monaco-editor-wrapper where applicable - Updated test timeout and vite optimizeDeps - Implemented review comments - GHA: Properly dispose editor app in tests (saves lots of memory in Playwright/Chromium)
Fixes #919