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

Travis should support ES6 #815

Closed
lobax opened this issue Feb 15, 2018 · 3 comments
Closed

Travis should support ES6 #815

lobax opened this issue Feb 15, 2018 · 3 comments

Comments

@lobax
Copy link
Contributor

lobax commented Feb 15, 2018

As a part of #807 and #811, we need to be able to test the modern ES6 constructs. These will however currently fail on travis, given that travis is configured to run on Node.js 0.10 (which does not support ES6 constructs).

Proposed solution: Travis should be configured to run on a newer version of Node that supports ES6 (e.g. 8.x)

@lobax
Copy link
Contributor Author

lobax commented Feb 15, 2018

Setting node to 8.x gives the following error when running on travis

Error: Can't set headers after they are sent.
    at validateHeader (_http_outgoing.js:494:11)
    at ServerResponse.setHeader (_http_outgoing.js:501:3)
    at ServerResponse.header (/home/travis/build/DD2480-G9/metrics-graphics/node_modules/express/lib/response.js:767:10)
    at ServerResponse.send (/home/travis/build/DD2480-G9/metrics-graphics/node_modules/express/lib/response.js:170:12)
    at /home/travis/build/DD2480-G9/metrics-graphics/node_modules/testem/lib/server/index.js:93:27
    at Layer.handle_error (/home/travis/build/DD2480-G9/metrics-graphics/node_modules/express/lib/router/layer.js:71:5)
    at trim_prefix (/home/travis/build/DD2480-G9/metrics-graphics/node_modules/express/lib/router/index.js:315:13)
    at /home/travis/build/DD2480-G9/metrics-graphics/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/travis/build/DD2480-G9/metrics-graphics/node_modules/express/lib/router/index.js:335:12)
    at next (/home/travis/build/DD2480-G9/metrics-graphics/node_modules/express/lib/router/index.js:275:10)

So the fix is not as trivial as I thought. Any insights as to what is going on @wlach?

@wlach
Copy link
Collaborator

wlach commented Feb 15, 2018

Hmm, the version of node you're specifying in that change looks weird. Could you try to specify the node version as done here:

https://github.com/iodide-project/iodide/blob/ec1dbaba28cd7c3860fd504055831bf91755566f/.travis.yml#L3

Also, in the future when you're working on something like this, just go ahead and make the pull request (even if it's "broken") -- it'll be easier for me to find the changes and avoids the overhead of having a separate issue. :)

@wlach
Copy link
Collaborator

wlach commented Feb 20, 2018

I think we're good here, thanks @lobax and co.!

@wlach wlach closed this as completed Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants