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

start failed with theia v1.21.0 #147

Open
navono opened this issue Jan 14, 2022 · 7 comments
Open

start failed with theia v1.21.0 #147

navono opened this issue Jan 14, 2022 · 7 comments
Labels

Comments

@navono
Copy link

navono commented Jan 14, 2022

Description

Add @theia/[email protected] to latest version of @Theia, then start from electron, its pending in loading page.

How to reproduce:

{
  "private": true,
  "name": "electron-app",
  "version": "0.0.0",
  "main": "src-gen/frontend/electron-main.js",
  "dependencies": {
    "@theia/console": "^1.21.0",
    "@theia/core": "latest",
    "@theia/cpp-debug": "^1.19.0",
    "@theia/debug": "^1.21.0",
    "@theia/editor": "latest",
    "@theia/electron": "latest",
    "@theia/file-search": "^1.21.0",
    "@theia/filesystem": "latest",
    "@theia/getting-started": "^1.21.0",
    "@theia/markers": "latest",
    "@theia/messages": "latest",
    "@theia/monaco": "latest",
    "@theia/navigator": "latest",
    "@theia/output": "^1.21.0",
    "@theia/plugin-ext-vscode": "^1.21.0",
    "@theia/preferences": "latest",
    "@theia/process": "latest",
    "@theia/property-view": "^1.21.0",
    "@theia/search-in-workspace": "^1.21.0",
    "@theia/task": "^1.21.0",
    "@theia/terminal": "latest",
    "@theia/typehierarchy": "^1.21.0",
    "@theia/vsx-registry": "^1.21.0",
    "@theia/workspace": "latest",
    "theia-hello-world-extension": "0.1.0"
  },
  "devDependencies": {
    "@theia/cli": "latest"
  },
  "scripts": {
    "prepare": "theia build --mode development",
    "start": "theia start --log-level=debug --plugins=local-dir:../plugins",
    "watch": "theia build --watch --mode development"
  },
  "theia": {
    "target": "electron"
  },
  "frontend": {
    "config": {
      "applicationName": "Theia Preload Example"
    }
  }
}

Expected behavior

Electron start and can debug cpp file.

Environment

  • OS: Win10
  • Browser: none
  • Theia Version: 1.21.0

Additional information

image

@navono navono added the bug label Jan 14, 2022
@vince-fugnitto
Copy link
Member

@navono thank you for the issue, you cannot mix and match versions of @theia dependencies, since inversify cannot tell how to resolve it (ex: multiple versions of @theia/core).

@navono
Copy link
Author

navono commented Jan 14, 2022

@vince-fugnitto thank you for your quickly response. Is it that's means that @theia@cpp-debug only support theia v.1.19.0?

@navono
Copy link
Author

navono commented Jan 14, 2022

another question is, when I run example/electron and open cpp-debug-workspace, it will occur error when run compile example task:

image

@vince-fugnitto
Copy link
Member

@vince-fugnitto thank you for your quickly response. Is it that's means that @theia@cpp-debug only support theia v.1.19.0?

Yes that's correct, @theia/cpp-debug currently targets v1.19.0. You can verify that two different versions of core are targeted by running yarn why @theia/core:

$ yarn why @theia/core
yarn why v1.22.4
[1/4] Why do we have the module "@theia/core"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "@theia/[email protected]"
info Has been hoisted to "@theia/core"
info Reasons this module exists
   - Specified in "dependencies"
   - Hoisted from "@theia#outline-view#@theia#core"
   - Hoisted from "@theia#userstorage#@theia#core"
   - Hoisted from "@theia#variable-resolver#@theia#core"
   - Hoisted from "@theia#console#@theia#core"
   - Hoisted from "@theia#debug#@theia#core"
   - Hoisted from "@theia#editor#@theia#core"
   - Hoisted from "@theia#file-search#@theia#core"
   - Hoisted from "@theia#filesystem#@theia#core"
   - Hoisted from "@theia#getting-started#@theia#core"
   - Hoisted from "@theia#markers#@theia#core"
   - Hoisted from "@theia#messages#@theia#core"
   - Hoisted from "@theia#monaco#@theia#core"
   - Hoisted from "@theia#navigator#@theia#core"
   - Hoisted from "@theia#output#@theia#core"
   - Hoisted from "@theia#plugin-ext-vscode#@theia#core"
   - Hoisted from "@theia#preferences#@theia#core"
   - Hoisted from "@theia#process#@theia#core"
   - Hoisted from "@theia#property-view#@theia#core"
   - Hoisted from "@theia#search-in-workspace#@theia#core"
   - Hoisted from "@theia#task#@theia#core"
   - Hoisted from "@theia#terminal#@theia#core"
   - Hoisted from "@theia#typehierarchy#@theia#core"
   - Hoisted from "@theia#vsx-registry#@theia#core"
   - Hoisted from "@theia#workspace#@theia#core"
   - Hoisted from "@theia#plugin-ext-vscode#@theia#callhierarchy#@theia#core"
   - Hoisted from "@theia#getting-started#@theia#keymaps#@theia#core"
   - Hoisted from "@theia#plugin-ext-vscode#@theia#plugin-ext#@theia#core"
   - Hoisted from "@theia#plugin-ext-vscode#@theia#plugin-ext#@theia#bulk-edit#@theia#core"
   - Hoisted from "@theia#plugin-ext-vscode#@theia#plugin-ext#@theia#scm#@theia#core"
   - Hoisted from "@theia#plugin-ext-vscode#@theia#plugin-ext#@theia#timeline#@theia#core"
info Disk size without dependencies: "12.34MB"
info Disk size with unique dependencies: "42.85MB"
info Disk size with transitive dependencies: "64.23MB"
info Number of shared dependencies: 169
=> Found "@theia/cpp-debug#@theia/[email protected]"
info Reasons this module exists
   - "@theia#cpp-debug" depends on it
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#console#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#editor#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#filesystem#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#markers#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#monaco#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#output#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#preferences#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#process#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#task#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#terminal#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#userstorage#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#variable-resolver#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#workspace#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#markers#@theia#navigator#@theia#core"
   - Hoisted from "@theia#cpp-debug#@theia#debug#@theia#monaco#@theia#outline-view#@theia#core"
info Disk size without dependencies: "11.42MB"
info Disk size with unique dependencies: "41.59MB"
info Disk size with transitive dependencies: "62.06MB"
info Number of shared dependencies: 166
Done in 1.24s.

A newer version of @theia/cpp-debug would need to be released before it can be used with newer versions of the framework.

@vince-fugnitto
Copy link
Member

another question is, when I run example/electron and open cpp-debug-workspace, it will occur error when run compile example task:

I believe the error you might have experience is due to a bug in electron-rebuild.
The following works for me (using this repo as an example):

  1. yarn
  2. cd examples/electron
  3. yarn theia rebuild:electron
  4. yarn start
  5. open cpp-debug-workspace as a workspace
  6. run the task compile example

@navono
Copy link
Author

navono commented Jan 15, 2022

A newer version of @theia/cpp-debug would need to be released before it can be used with newer versions of the framework.

Any plan to release latest version?

The following works for me (using this repo as an example):

I'll try it later, thank you.

@vince-fugnitto
Copy link
Member

@navono sorry for the late reply, I think the notification fell under the cracks.

Any plan to release latest version?

I can plan a release for it when we do the next release of the framework. You are able however to get it to work if you are to use resolutions in your application like so. Basically the idea to resolve @theia/ extensions that @theia/cpp-debug to the same version as other theia extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants