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

chore(travis): Test on Node 5, don't update npm in newer Nodes #1672

Merged
merged 2 commits into from
Oct 30, 2015

Conversation

mgol
Copy link
Contributor

@mgol mgol commented Oct 30, 2015

Node 5 includes npm 3 by default so we don't have to update npm to make sure
it works on that version. On the other hand, most people don't upgrade npm
and just use the default included version, especially that it's very hard
to update npm on Windows. It's good to make sure Karma still works with npm 2,
especially that Node 4, current LTS will never upgrade to npm 3.

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

Everything passed except Node 4. Not sure what's going on here...

@dignifiedquire
Copy link
Member

Retriggered, lets see what happens

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

I think what's going here is the build is failing because the log is too long - travis fails the build after 4mb of output - the node5 build has the same errors/warnings as the node4 build but does succeed.
I wonder if 'apt-get install build-essential' would fix this as it's complaining about a lack of c++ compiler. or cranking down the npm loglevel to slient which wouldn't be very interesting if the build failed for some other reason :)

@dignifiedquire
Copy link
Member

It might have something to do with npm being not updated anymore, as otherwise this is the same as what we are currently running.

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

ok build-essential and g++ are already installed at their latest versions so that doesn't help. trying loglevel silent. the version of npm that comes with 4.2.1 (2.14.7) acts differently than npm with node5 (3.3.6) and latest npm (3.3.10)

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

I think they have to be in a new enough version if you want to compile something, the v8 used in Node>=4 can't be compiled via old gcc. Take a look at these lines in .travis.yml of node-sass.

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

welp got travis to pass with npm output set to silent: https://travis-ci.org/karma-runner/karma/builds/88365243
There's still a ton of output and it's still complaining about c++ (the problem is the gcc compiler is at version 199711L but NAN wants a c++ compiler at 201103L) however 199711L IS the latest version of gcc (at least on the travis VMs) so insanity ensues.
The deps it cannot install are optional but the amount of output is insane (as many others have complained about). Even with 'silent' there's still a ton of output - in fact none of that error output is supressed at all as it's not coming from npm.
thoughts?

@GitCop
Copy link

GitCop commented Oct 30, 2015

There were the following issues with your Pull Request

  • Commit: 94cb0e5
    • Your subject line is longer than 70 characters

Guidelines are available at http://karma-runner.github.io/0.13/dev/git-commit-msg.html


This message was auto-generated by https://gitcop.com

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

@mzgol unfortunately both 4.7 and 4.8 both report themselves as 199711

@GitCop
Copy link

GitCop commented Oct 30, 2015

There were the following issues with your Pull Request

  • Commit: 754182b
    • Your subject line is longer than 70 characters

Guidelines are available at http://karma-runner.github.io/0.13/dev/git-commit-msg.html


This message was auto-generated by https://gitcop.com

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

node-sass compiles fine on Travis on Node 5: https://travis-ci.org/sass/node-sass/jobs/88302086. I'm checking what else do we need from their config to make it work.

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

I'm trying to install the proper gcc/g++ versions and export proper env variables to make the commands use it but g++ --version still prints 4.6.3... I see that node-sass now declares its project language as cpp instead of node_js, I hope that's not necessary here. :O

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

thanks there's also this: nodejs/nan#506 (comment)
so 4.8 should work but it needs that flag. Not sure why that flag is not being supplied by gyp - i'll update that issue with more questions...

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

Hmm, I didn't add any flag and it compiled correctly this time: https://travis-ci.org/karma-runner/karma/jobs/88381644.

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

@zoo from the comment:

You need to compile with -std=c++11 for __cplusplus >= 201103 but you get that for free when you target node.js >= 4.

So my PR in its current state should be fine. :)

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

I wonder if the gcc upgrade is needed, maybe g++ is enough?

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

yes! installing 4.8 and setting 'CXX=g++-4.8' is the magic - great!

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

OK, I've removed some excessive variables & packages, this should still work but let's see.

@mgol mgol force-pushed the node5 branch 2 times, most recently from 71578f8 to bf5b942 Compare October 30, 2015 17:38
@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

OK, I've tried with g++5 but the bundles are huge (https://travis-ci.org/karma-runner/karma/jobs/88392214), ~50 MB compared to ~8 MB for 4.8 so I reverted back to 4.8. The tests passed last time so it should be fine but we can wait to be 100% sure. :)

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

agreed 5.0 unnecessary - 4.8 is fine thanks

@dignifiedquire
Copy link
Member

Thanks guys for working through the compiler swamp :)

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

Haha, between my last 2 attempts a new ESLint version got released and the build now fails because of one excessive space. 👯

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

classic - this was as good of a time of this to happen as any tho

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

The following code in proxy.js is the problem:

exports.create = function (/* config */ config, /* config.proxies */ proxies) {
  return createProxyHandler(parseProxyConfig(proxies, config), config.urlRoot)
}

Sounds like a regression in ESLint to me, I reported an issue: eslint/eslint#4302.

We'll need to workaround it for now, though, I'll have to remove spaces between comments & variable names to make it pass.

mgol added 2 commits October 30, 2015 19:01
Node 5 includes npm 3 by default so we don't have to update npm to make sure
it works on that version. On the other hand, most people don't upgrade npm
and just use the default included version, especially that it's very hard
to update npm on Windows. It's good to make sure Karma still works with npm 2,
especially that Node 4, current LTS will never upgrade to npm 3.

g++ got upgraded so that native module compilation works on Node >= 4;
otherwise lots of optional packages fail, making the log too large for Travis
which in turn kills the job.
@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

Oops, I forgot to add 5 as an accepted Node version in engines. PR updated.

@mgol
Copy link
Contributor Author

mgol commented Oct 30, 2015

@zzo @dignifiedquire All tests passed. This should be ready to go. :)

@zzo
Copy link
Contributor

zzo commented Oct 30, 2015

spectacular lgtm

dignifiedquire added a commit that referenced this pull request Oct 30, 2015
chore(travis): Test on Node 5, don't update npm in newer Nodes
@dignifiedquire dignifiedquire merged commit b668ad2 into karma-runner:master Oct 30, 2015
@dignifiedquire
Copy link
Member

Thanks :octocat:

@mgol mgol deleted the node5 branch October 30, 2015 18:41
@mgol mgol mentioned this pull request Nov 2, 2015
mgol added a commit to mgol/protractor that referenced this pull request Nov 19, 2015
Node.js 4 and newer require g++ newer than the one included in Travis by
default. Using the default g++ causes `npm install` to fail on compiled
dependencies - currently every such dependency of Protractor is optional
so the whole build doesn't fail but it still causes errors & excessive
logging.

If the number of compiled dependencies grows, install logs might become so
big that Travis stops - Karma has been hit by this problem recently.

Refs karma-runner/karma#1672
mgol added a commit to mgol/protractor that referenced this pull request Nov 19, 2015
Node.js 4 and newer require g++ newer than the one included in Travis by
default. Using the default g++ causes `npm install` to fail on compiled
dependencies - currently every such dependency of Protractor is optional
so the whole build doesn't fail but it still causes errors & excessive
logging.

If the number of compiled dependencies grows, install logs might become so
big that Travis stops - Karma has been hit by this problem recently.

Refs karma-runner/karma#1672
mgol added a commit to mgol/protractor that referenced this pull request Dec 28, 2015
Node.js 4 and newer require g++ newer than the one included in Travis by
default. Using the default g++ causes `npm install` to fail on compiled
dependencies - currently every such dependency of Protractor is optional
so the whole build doesn't fail but it still causes errors & excessive
logging.

If the number of compiled dependencies grows, install logs might become so
big that Travis stops - Karma has been hit by this problem recently.

Refs karma-runner/karma#1672
mgol added a commit to mgol/protractor that referenced this pull request Jan 21, 2016
Node.js 4 and newer require g++ newer than the one included in Travis by
default. Using the default g++ causes `npm install` to fail on compiled
dependencies - currently every such dependency of Protractor is optional
so the whole build doesn't fail but it still causes errors & excessive
logging.

If the number of compiled dependencies grows, install logs might become so
big that Travis stops - Karma has been hit by this problem recently.

Refs karma-runner/karma#1672
juliemr pushed a commit to angular/protractor that referenced this pull request Jan 22, 2016
Node.js 4 and newer require g++ newer than the one included in Travis by
default. Using the default g++ causes `npm install` to fail on compiled
dependencies - currently every such dependency of Protractor is optional
so the whole build doesn't fail but it still causes errors & excessive
logging.

If the number of compiled dependencies grows, install logs might become so
big that Travis stops - Karma has been hit by this problem recently.

Refs karma-runner/karma#1672
bodyduardU pushed a commit to bodyduardU/protractor that referenced this pull request Dec 5, 2022
Node.js 4 and newer require g++ newer than the one included in Travis by
default. Using the default g++ causes `npm install` to fail on compiled
dependencies - currently every such dependency of Protractor is optional
so the whole build doesn't fail but it still causes errors & excessive
logging.

If the number of compiled dependencies grows, install logs might become so
big that Travis stops - Karma has been hit by this problem recently.

Refs karma-runner/karma#1672
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

Successfully merging this pull request may close these issues.

4 participants