ITISFoundation / osparc-simcore

🐼 osparc-simcore simulation framework
https://osparc.io
MIT License
43 stars 27 forks source link

qx build fails #212

Closed pcrespov closed 5 years ago

pcrespov commented 6 years ago

qx compile --target=build in our container is producing an output with errors

Image Pasted at 2018-9-6 13-32.png.jpeg

how-to-reproduce

cd osparc-simcore/web/server/client
docker-compose build --no-cache
docker-compose run qx compile --target=build
pcrespov commented 6 years ago

These are images with qx inside built at different times (see created date)

~ $ docker image ls --filter 'reference=*client*'
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
services_webclient   build               93786bdc9ec3        3 hours ago         1.02GB
client_qx            build               93786bdc9ec3        3 hours ago         1.02GB
services_webclient   dev                 1ec48e8131ad        7 days ago          996MB
client_qx            development         1e11af4b185c        7 weeks ago         988MB

I created a test.sh script to spit out the versions of the compiler and sdk

#!/bin/bash
echo qooxdoo-compiler: $(qx --help 2>&1 >/dev/null | grep  Versions | cut -c28-)
echo qooxdoo-sdk     : $(cat ${QOOXDOO_PATH}/version.txt)
echo http-server     : $(npm -g info http-server version)

et voila

~ $ docker run -it --entrypoint ./test.sh -v $(pwd):/home/scu/client client_qx:build
qooxdoo-compiler: v0.2.14
qooxdoo-sdk : 6.0.0-alpha
http-server : 0.11.1
~ $ docker run -it --entrypoint ./test.sh -v $(pwd):/home/scu/client services_webclient:build
qooxdoo-compiler: v0.2.14
qooxdoo-sdk : 6.0.0-alpha
http-server : 0.11.1
~ $ docker run -it --entrypoint ./test.sh -v $(pwd):/home/scu/client services_webclient:dev
qooxdoo-compiler: v0.2.14
qooxdoo-sdk : 6.0.0-alpha
http-server : 0.11.1
~ $ docker run -it --entrypoint ./test.sh -v $(pwd):/home/scu/client client_qx:development
qooxdoo-compiler: v0.2.13
qooxdoo-sdk : 6.0.0-alpha
http-server : 0.11.1

version pairs sdk-compiler differ!! Could you please have a look at the magic in the client/Dockefile

oetiker commented 6 years ago

will take a look

oetiker commented 6 years ago

the problem is that it seems that iconfonts break in the compiled version of the application

oetiker commented 6 years ago

I have managed to reproduce the problem with https://github.com/ITISFoundation/qx-iconfont-fontawesome5

oetiker commented 6 years ago

further debugging shows that Image.js in the qx framework seems to behave differently when compiled in build mode ... not handling icon fonts as expected

oetiker commented 6 years ago

the problem is NOT related to the qx-compiler release ... the build version also fails when generated with qx compiler 0.2.13

oetiker commented 6 years ago

the problem is that build mode breaks if else structures in Image.js ... fixed by https://github.com/qooxdoo/qooxdoo/pull/9573

further investigation into the root cause is required https://github.com/qooxdoo/qooxdoo-compiler/issues/207

pcrespov commented 6 years ago
$ docker image ls --filter='reference=*client*'
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
client_qx            build               93786bdc9ec3        5 days ago          1.02GB
client_qx            development         1e11af4b185c        7 weeks ago         988MB
$ docker run -it --entrypoint /bin/sh itisfoundation/client_qx:development
$ npm show babel version
6.23.0
$ npm show babel-cli version
6.23.0
$ docker run -it --entrypoint /bin/sh itisfoundation/client_qx:build
$  npm show babel version
6.23.0

They have the same babel version! I pushed both into dockerhub. You can type the commands above and will be pulled into your computer just in case you want to explore for more details.

oetiker commented 6 years ago

a new version of qxcompiler has been published with shrinkwrap now ... so by reinstalling qxcompiler all should be well.