Theia: 'yarn watch' results in non-starting backend

Created on 8 Feb 2018  路  12Comments  路  Source: eclipse-theia/theia

On the latest master, compiling using "yarn" works fine. However, compiling in watch mode, "yarn watch" results in the following exception, when starting the backend:
Failed to start the backend application. ReferenceError: raw_process_1 is not defined at ContainerModule.registry (/opt/ericsson-dev/theia/packages/process/lib/node/process-backend-module.js:11:10) at /opt/ericsson-dev/theia/node_modules/inversify/lib/container/container.js:107:20 at Array.forEach (native) at Container.load (/opt/ericsson-dev/theia/node_modules/inversify/lib/container/container.js:102:17) at Promise.resolve.then.module (/opt/ericsson-dev/theia/examples/browser/src-gen/backend/server.js:19:19) at <anonymous> at process._tickCallback (internal/process/next_tick.js:169:7)

So I did a diff between the resulting "process-backend-module.js", compiled with and without watch. It seems that with watch, there is some missing code, that explains the exception above:

image

Looking at other file sizes, this might also be happening with some other extensions as well.

bug

All 12 comments

Whatever is happening seems to affect at least some (all?) of the compiled *-backend-module.js , *-frontend-module.js, of various extensions.

Also running watch on an individual extension seems not to reproduce the issue. e.g.:

npx run watch @theia/process

should be fixed with 2.7.2, as typescript@next doesn't have this issue. I was wondering about this. doesn't happen with all .ts files, so far only with container module files for me.

should I revert 2.7 typescript upgrade or we're waiting 2.7.2 ?

This is fixed in typescript@next and according to @mhegazy fix will be published in 2.7.2.

Just for reference: https://github.com/marianmeres/typescript-2.7.1-issue

Is there a date for 2.7.2already? We could go with @next until then.

One also can use npx run watch mypackage as a workaround for a week, it eats less CPU as well

@akosyakov this is affected too

ok, strangely have not noticed it yesterday

One also can use npx run watch mypackage as a workaround for a week, it eats less CPU as well

That seems to work for me

@benoitf thanks, but I am ok with waiting for 2.7.2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vinokurig picture vinokurig  路  3Comments

kpge picture kpge  路  3Comments

jankeromnes picture jankeromnes  路  3Comments

vince-fugnitto picture vince-fugnitto  路  3Comments

akosyakov picture akosyakov  路  3Comments