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

Running "theia build" in hello-world-extension project browser-app folder breaks it all #5182

Closed
maxhillaert opened this issue May 17, 2019 · 5 comments
Labels
bug bugs found in the application

Comments

@maxhillaert
Copy link

maxhillaert commented May 17, 2019

Description

I'm using the project setup as suggested by the "Authoring Extension" gitbook section: https://www.theia-ide.org/doc/Authoring_Extensions.html

The setup seems to be brittle when you run yarn scripts at the wrong location within the project. theia build in browser-app will break the bundles and make the extension disappear from the theia-app when started.

Reproduction

Execute the steps in the tutorial

  1. yo theia-extension hello-world-extension
  2. let it finish , which will run "yarn prepare" script from root of the workspace
  3. cd browser-app
  4. yarn start
  5. Check for Hello Menu item in localhost:3000 and its there
  6. Stop the server CTRL-C
  7. still in browser-app, do "yarn prepare" which will run theia build
  8. When it's finished do "yarn start"
  9. Go to localhost:3000 and there is no sign of Hello menu item. No errors.

Any attempt to setup up a workflow with the watch scripts produces the same issue. It just doesn't work as it breaks the link between extension and browser-app. You have to start from scratch and run the lerna command from root?

What is going on here? Am I using wrong versions of things? Is this known issue?

Thanks

OS and Theia version:

Windows 7
yarn 1.15.2
lerna 2.4.0
theia latest as of today

yarn list v1.15.2
├─ @msci/maml-theia-browser@0.0.0
├─ @theia/application-manager@0.6.1
├─ @theia/application-package@0.6.1
├─ @theia/callhierarchy@0.6.1
├─ @theia/cli@0.6.1
├─ @theia/core@0.6.1
├─ @theia/editor@0.6.1
├─ @theia/filesystem@0.6.1
├─ @theia/json@0.6.1
├─ @theia/languages@0.6.1
├─ @theia/markers@0.6.1
├─ @theia/messages@0.6.1
├─ @theia/monaco@0.6.1
├─ @theia/navigator@0.6.1
├─ @theia/node-pty@0.7.8-theia004
├─ @theia/outline-view@0.6.1
├─ @theia/output@0.6.1
├─ @theia/preferences@0.6.1
├─ @theia/process@0.6.1
├─ @theia/terminal@0.6.1
├─ @theia/textmate-grammars@0.6.1
├─ @theia/typescript@0.6.1
├─ @theia/userstorage@0.6.1
├─ @theia/variable-resolver@0.6.1
└─ @theia/workspace@0.6.1

@maxhillaert maxhillaert reopened this May 18, 2019
@maxhillaert maxhillaert changed the title "yarn theia build" doesn't pick up my extension, unless I run it from the root of my monorepo via lerna Running "theia build" in hello-world-extension project browser-app folder breaks it all May 18, 2019
@akosyakov
Copy link
Member

Can someone transfer issue to https://github.com/theia-ide/generator-theia-extension? GitHub does not allow me.

@akosyakov akosyakov added the bug bugs found in the application label May 27, 2019
@vince-fugnitto
Copy link
Member

The watch workflow was described here if anyone had similar issues.

The main idea is the following:

  • Perform yarn at the root of the repository.
  • Start the browser application by (cd browser-app && yarn start).
  • In order to watch the extension, perform (cd {extension-name} && yarn watch) in a new terminal.
  • In order to watch the application (so it can see changes from the extension), perform (cd browser-app && yarn watch) in a new terminal.

In this way, the application is running, the extension is being watched for changes, and the browser application is being watched for changes to the extension.

@vince-fugnitto
Copy link
Member

Can someone transfer issue to https://github.com/theia-ide/generator-theia-extension? GitHub does not allow me.

Sure, no problem!
eclipse-theia/generator-theia-extension#36

@marcdumais-work
Copy link
Contributor

Can someone transfer issue to https://github.com/theia-ide/generator-theia-extension? GitHub does not allow me.

Looks-like there is a bug in the issue transfer feature. When selecting the destination GH repo, I see the list of repos for a fraction of a second, then the drop-down is empty...

@vince-fugnitto
Copy link
Member

Closing as it's been transferred to eclipse-theia/generator-theia-extension#36

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

No branches or pull requests

4 participants