eclipse-theia / theia-blueprint

The Eclipse IDE is a modern and open IDE for cloud and desktop. The Theia IDE is based on the Theia platform. The Theia IDE is available as a downloadable desktop application. You can also try the latest version of the Theia IDE online. For more details, see the Readme below.
https://theia-ide.org/#theiaide
MIT License
335 stars 125 forks source link

`Run Extension` Launch Config Does not Work #281

Open tsmaeder opened 1 year ago

tsmaeder commented 1 year ago

Bug Description:

Run Extension Launch Config Does not Work

Steps to Reproduce:

  1. Generate a VS Code extension with yo code
  2. Open the generated folder
  3. Execute the "Run Extension" launch config
  4. Observe: the start of the second theia window fails. The console says:

error Couldn't find a package.json file in "C:\\Users\\thomas\\software\\blueprint\\1.20.0\\TheiaBlueprint"

Additional Information

sgraband commented 8 months ago

I can take a look!

tsmaeder commented 5 months ago

It's pretty obvious why this does not work:

if (environment.electron.is()) {
            command = ['yarn', 'theia', 'start'];

https://github.com/eclipse-theia/theia/blob/69eaf80db46a490e784e05da084f84b73f01274d/packages/plugin-ext/src/hosted/node/hosted-instance-manager.ts#L240

dhuebner commented 4 months ago

@tsmaeder You mean it should be: if (environment.electron.isDevMode()) {

tsmaeder commented 4 months ago

@dhuebner no, yarn theia start only ever works if a user runs from source. That will never be the case in Theia IDE. We need to start the second instance without using any dev-time resources.

dhuebner commented 4 months ago

@tsmaeder

We need to start the second instance without using any dev-time resources.

Is this not what the else branch does? It seems to execute something that is runtime dir related, but I'm not sure how exactly it looks like in the bundled IDE.

How can I build Theia IDE from source to test it? I can't find corresponding documentation...

However, I think this missing functionality is really important for the Beta.

tsmaeder commented 4 months ago

The "else" branch covers the browser case. That might or might not be the right thing to do in the electron case.

dhuebner commented 4 months ago

@tsmaeder That is not good. I'm afraid I have not enough insights into the launching process to contribute here. :( But I would definitely like to learn more about, I will track the corresponding PR when one is submitted.

dhuebner commented 4 months ago

For those who interested, I found the documentation about how to build here. It is linked from the README.md in this repository, it was a bit confusing because of blueprint naming.