theia-blueprint icon indicating copy to clipboard operation
theia-blueprint copied to clipboard

Publish test release for Theia's Monaco uplift

Open colin-grant-work opened this issue 2 years ago • 8 comments

Feature Description:

@jfaltermeier, @JonasHelming, please publish a blueprint image (if possible) from the Monaco uplift branch to facilitate testing (with these steps).

Many thanks!

colin-grant-work avatar Mar 01 '22 20:03 colin-grant-work

Hi, so Blueprint consumes Theia from npm. Would it be possible to publish the branch to npm with a special tag (e.g. next-monaco)? This would be the easiest way to get a custom blueprint build for this. Also it would allow to rebuild easily when there are changes.

Otherwise I had a look at adding Theia as a submodule to Blueprint and trying to build both, but this seems more complicated. Locally I've also published the theia branch to a local npm-registry and built blueprint against this. However the application seems stuck at the loading screen.

jfaltermeier avatar Mar 03 '22 08:03 jfaltermeier

@paul-marechal, @vince-fugnitto, à propos the discussion in the dev meeting on Tuesday about getting a Blueprint image with which to test Monaco, would it be possible to publish specially tagged packages from that branch to NPM?

colin-grant-work avatar Mar 03 '22 14:03 colin-grant-work

@jfaltermeier, you mentioned submodules, but have you tried using local file dependencies rather than consuming from NPM? With a built version of the Monaco branch anywhere in your system, replacing @theia/* dependency versions with file:<path to local> should produce the same behavior as downloading an NPM package - yarn just copies the local files into node modules.

colin-grant-work avatar Mar 03 '22 15:03 colin-grant-work

@jfaltermeier you don't need to consume from npm, you can use local file paths instead like Colin said to reference the monaco build (ex: https://github.com/eclipse-theia/theia-blueprint/commit/4a2ebc9064804854994d6960605833d3c4efcae5).

The idea would be to:

  1. clone theia, and checkout the monaco uplift branch
  2. yarn
  3. update the resolutions to point to your local theia
  4. build and start

Is this sufficient or did you need some npm version for CI for example?

vince-fugnitto avatar Mar 03 '22 15:03 vince-fugnitto

Thanks, I've prepared a branch with file paths here: https://github.com/eclipse-theia/theia-blueprint/tree/jf/monaco-lift

Unfortunately the build (theia build) fails when running webpack. I've also tried the development mode, but this leads to a similar error.

theia-blueprint: ERROR in unable to locate '/Users/genie.theia/jenkins_agent/workspace/theia-wip_jf_monaco-lift/node_modules/@theia/monaco-editor-core/min/vs' glob
theia-blueprint: webpack 5.70.0 compiled with 1 error and 48 warnings in 157139 ms
theia-blueprint: Error: webpack exited with an unexpected code: 1.
theia-blueprint:     at ChildProcess.<anonymous> (/Users/genie.theia/jenkins_agent/workspace/theia-wip_jf_monaco-lift/node_modules/@theia/application-manager/lib/application-process.js:66:28)
theia-blueprint:     at ChildProcess.emit (events.js:314:20)
theia-blueprint:     at maybeClose (internal/child_process.js:1022:16)
theia-blueprint:     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
theia-blueprint: error Command failed with exit code 1.

jfaltermeier avatar Mar 04 '22 09:03 jfaltermeier

@jfaltermeier, thanks I'll look into it.

colin-grant-work avatar Mar 07 '22 20:03 colin-grant-work

@jfaltermeier, the error you posted suggests that the generated webpack configuration is still trying to resolve the old Monaco packages. The Monaco branch includes changes to the webpack generator. That's in @theia/application-manager, so a resolution needs to be added for that as well. I think that this list of resolutions covers all of the direct and transitive dependencies on the theia repo:

  "resolutions": {
    "**/@theia/application-manager": "file:...theia/dev-packages/application-manager",
    "**/@theia/application-package": "file:...theia/dev-packages/application-package",
    "**/@theia/cli": "file:...theia/dev-packages/cli",
    "**/@theia/ffmpeg": "file:...theia/dev-packages/ffmpeg",
    "**/@theia/localization-manager": "file:...theia/dev-packages/localization-manager",
    "**/@theia/ovsx-client": "file:...theia/dev-packages/ovsx-client",
    "**/@theia/bulk-edit": "file:...theia/packages/bulk-edit",
    "**/@theia/callhierarchy": "file:...theia/packages/callhierarchy",
    "**/@theia/console": "file:...theia/packages/console",
    "**/@theia/core": "file:...theia/packages/core",
    "**/@theia/debug": "file:...theia/packages/debug",
    "**/@theia/editor": "file:...theia/packages/editor",
    "**/@theia/editor-preview": "file:...theia/packages/editor-preview",
    "**/@theia/electron": "file:...theia/packages/electron",
    "**/@theia/external-terminal": "file:...theia/packages/external-terminal",
    "**/@theia/file-search": "file:...theia/packages/file-search",
    "**/@theia/filesystem": "file:...theia/packages/filesystem",
    "**/@theia/getting-started": "file:...theia/packages/getting-started",
    "**/@theia/keymaps": "file:...theia/packages/keymaps",
    "**/@theia/markers": "file:...theia/packages/markers",
    "**/@theia/messages": "file:...theia/packages/messages",
    "**/@theia/metrics": "file:...theia/packages/metrics",
    "**/@theia/mini-browser": "file:...theia/packages/mini-browser",
    "**/@theia/monaco": "file:...theia/packages/monaco",
    "**/@theia/navigator": "file:...theia/packages/navigator",
    "**/@theia/outline-view": "file:...theia/packages/outline-view",
    "**/@theia/output": "file:...theia/packages/output",
    "**/@theia/plugin": "file:...theia/packages/plugin",
    "**/@theia/plugin-dev": "file:...theia/packages/plugin-dev",
    "**/@theia/plugin-ext": "file:...theia/packages/plugin-ext",
    "**/@theia/plugin-ext-vscode": "file:...theia/packages/plugin-ext-vscode",
    "**/@theia/preferences": "file:...theia/packages/preferences",
    "**/@theia/process": "file:...theia/packages/process",
    "**/@theia/property-view": "file:...theia/packages/property-view",
    "**/@theia/scm": "file:...theia/packages/scm",
    "**/@theia/scm-extra": "file:...theia/packages/scm-extra",
    "**/@theia/search-in-workspace": "file:...theia/packages/search-in-workspace",
    "**/@theia/task": "file:...theia/packages/task",
    "**/@theia/terminal": "file:...theia/packages/terminal",
    "**/@theia/timeline": "file:...theia/packages/timeline",
    "**/@theia/toolbar": "file:...theia/packages/toolbar",
    "**/@theia/typehierarchy": "file:...theia/packages/typehierarchy",
    "**/@theia/userstorage": "file:...theia/packages/userstorage",
    "**/@theia/variable-resolver": "file:...theia/packages/variable-resolver",
    "**/@theia/vsx-registry": "file:...theia/packages/vsx-registry",
    "**/@theia/workspace": "file:...theia/packages/workspace"
  },

colin-grant-work avatar Mar 10 '22 19:03 colin-grant-work

@colin-grant-work Thanks, I've updated the branch accordingly. The results are currently published to: https://download.eclipse.org/theia/next-monaco/

Currently there is an issue that Theia is stuck on the preload animation, which might be related to the monaco-uplift branch.

jfaltermeier avatar Mar 11 '22 12:03 jfaltermeier