Che: Build of che-theia is broken

Created on 28 Jan 2020  路  6Comments  路  Source: eclipse/che

Describe the bug

It looks like after merging this commit to Theia master, we cannot properly build che-theia.

In fact, yarn command finishes without errors, but after navigating to examples/assembly directory it turns out that the assembly is non built.

Only after running yarn run prepare @eclipse-che/theia-assembly in Theia root we can see that it's impossible to build package at all.

Steps to reproduce

  • clone theia sources
  • init che-theia by running che:theia init
  • builtd by yarn

Expected behavior

The directory examples/assembly must have built che-theia.

Runtime

  • [x] Openshift (include output of oc version)
  • [x] minikube (include output of minikube version and kubectl version)

Screenshots

Screenshot from 2020-01-28 14-51-14

Screenshot from 2020-01-28 14-52-22

areci areeditoche-theia kinbug severitblocker teaeditors

Most helpful comment

@RomanNikitenko yes, upstream theia is using typescript build mode.
For building the image there is no 'gain' as we always start from scratch.
But in development mode, it's keeping a cache with incremental mode so it's faster.

I added (added by che-theia generator) in the example/assembly a tsconfig json file which references all tsconfig.json of eclipse che theia packages. Note that the order is important for now as it's how the compiler will do the graph. To enhance that, we should reference in each tsconfig.json file the dependencies through their tsconfig.json (we could reuse the @dependencies/devDependencies and generate that as well automatically)

Then, the root config [1] is now including as well a link to the tsconfig.json of example/assembly (modified again by the generator)

Some libraries have been updated upstream but I had to stick to an older version of mkdirp as ci.codenvycorp used to validate PR is using nodejs 8 (!!!!) while new versions of mkdirp are requiring nodejs >= 10

[1] : https://github.com/eclipse-theia/theia/blob/master/configs/root-compilation.tsconfig.json

All 6 comments

They switched to eslint. Translation of directives should be pretty straightforward, though.

It's more about typescript mode as well for now
attempts on fixing all issues is there: https://github.com/eclipse/che-theia/pull/609

I get errors locally like:

errors
So che-theia extensions can not be resolved.

@benoitf
Does that mean the cause of the issue is related to TypeScript build mode and should be resolved by adding some compilation.tsconfig.json with the corresponding references?

thanks @benoitf for fix!
The PR was merged, so I'm closing the issue.

@RomanNikitenko yes, upstream theia is using typescript build mode.
For building the image there is no 'gain' as we always start from scratch.
But in development mode, it's keeping a cache with incremental mode so it's faster.

I added (added by che-theia generator) in the example/assembly a tsconfig json file which references all tsconfig.json of eclipse che theia packages. Note that the order is important for now as it's how the compiler will do the graph. To enhance that, we should reference in each tsconfig.json file the dependencies through their tsconfig.json (we could reuse the @dependencies/devDependencies and generate that as well automatically)

Then, the root config [1] is now including as well a link to the tsconfig.json of example/assembly (modified again by the generator)

Some libraries have been updated upstream but I had to stick to an older version of mkdirp as ci.codenvycorp used to validate PR is using nodejs 8 (!!!!) while new versions of mkdirp are requiring nodejs >= 10

[1] : https://github.com/eclipse-theia/theia/blob/master/configs/root-compilation.tsconfig.json

@benoitf
Yesterday I investigated how it works by adding compile.tsconfig.json files with the corresponding references as I commented here. But I tried it not on building images step, but using che-in-che, just to understand how it works. Today I can see your response, the changes for generator and dockerfile, it extends my knowledge and experience about it.

thank you very much for the detailed response!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndrienkoAleksandr picture AndrienkoAleksandr  路  3Comments

vanzhiganov picture vanzhiganov  路  3Comments

LaneGeek picture LaneGeek  路  3Comments

luckymore0520 picture luckymore0520  路  3Comments

apupier picture apupier  路  3Comments