Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

NodeJS v4 support - fixing the failed build #922

Merged

Conversation

lirantal
Copy link
Member

Adding the required support to properly build the nodejs v4 edition.

Source and credit originated from: lirantal#1

@lirantal lirantal added this to the 0.4.2 milestone Sep 18, 2015
@lirantal lirantal self-assigned this Sep 18, 2015
@ilanbiala
Copy link
Member

@lirantal 4.0 still failed. Check Travis. Also, if we fix Node 4.0 support, then we should remove the allow_failures rule for it.

@lirantal
Copy link
Member Author

yep, still more work to do there

@lirantal
Copy link
Member Author

there's an open issue (socketio/socket.io#2228) with socket.io ability to build on node v4 now, I've been trying some magic but so far no luck. Another option for us is to add shrinkwrap (which I think is a good idea so I'll take a look at it) to control our own sub-dependency versions if we need to.

@mleanos
Copy link
Member

mleanos commented Sep 19, 2015

👍 On skrinkwrap. I was looking at that a while ago, and thought it was a good solution for this project.

@vielmetti
Copy link

[email protected] is said to have node.js 4.x support. https://twitter.com/SocketIO/status/645755967934697472

@vielmetti
Copy link

I was also having issues with one of the dev dependencies, grunt-node-inspector, which is at 0.2.0.

@lirantal
Copy link
Member Author

yep, saw that and also Edward from the original PR gave me a ping about it.
I'll update the PR soon enough.

env:
- NODE_ENV=travis
- NODE_ENV=travis CXX="g++-4.8" CC="gcc-4.8"
matrix:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are attempting to get Node 4 passing, we should remove this section.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's the reason for it, but rather node-inspector which is failing.

@ilanbiala
Copy link
Member

@lirantal any progress on this?

@lirantal
Copy link
Member Author

lirantal commented Oct 2, 2015

I pushed an update to a newer grunt-node-inspector version which seem to be the culprit, let's see how it goes.

@ilanbiala
Copy link
Member

@lirantal 1 test failed. Look at the bottom https://travis-ci.org/meanjs/mean/jobs/83342174

Also, if we are going to make sure Node 4 builds and works, please remove the allow failure part for it because it shouldn't be there anymore.

@lirantal
Copy link
Member Author

lirantal commented Oct 2, 2015

Yeah I just noticed that it finished with a fail for a test, which is related apparently to different messages between node/other package versions:

1) User CRUD tests should be able to login successfully and logout successfully:
      Uncaught AssertionError: expected 'Found. Redirecting to /' to be 'Moved Temporarily. Redirecting to /'
      + expected - actual
      +"Moved Temporarily. Redirecting to /"
      -"Found. Redirecting to /"

I'm not sure if we want to rely 100% now on node v4 so I say let's keep the allow_failures there still.. As you saw there are many core packages like grunt-node-inspector and others that didn't yet even sync with the node v4 version to become compatible.

@codydaig
Copy link
Member

codydaig commented Oct 2, 2015

@lirantal LGTM. I say merge this in, to get people closer to Node 4.0 support. It's been a popular issue lately.

@ilanbiala
Copy link
Member

@lirantal I'd rather not merge and keep allow failures, it is deceiving.

@lirantal
Copy link
Member Author

lirantal commented Oct 3, 2015

@ilanbiala what's deceiving? I don't get it. It's not like the project states it is compatible with v4.
We always had allow_failures on for v4 and I think it should be kept this way for a while until the ecosystem becomes more aware and compatible with v4.

@ilanbiala
Copy link
Member

@lirantal most people don't know about allow_failures, and they won't look closely enough to notice that v4 doesn't have to pass for the badge to show passing.

@lirantal
Copy link
Member Author

lirantal commented Oct 3, 2015

That's why we as moderators should look into that.
You suggest that remove allow_failures and let the build fail entirely if some PR doesn't meet v4 compatibility but that potentially has the possibility of delaying many PRs from being accepted because all the PRs will always fail, and the fix for node v4 might be out of our reach and not so quickly available.

I don't see the point in failing the build entirely for v4 compatibility for the time being.

@codydaig
Copy link
Member

codydaig commented Oct 4, 2015

I don't think it should fail on node v4 until we start to officially support it.

@lirantal
Copy link
Member Author

lirantal commented Oct 4, 2015

That's what I'm saying... it currently fails on some test as well that we need to fix to make the build pass v4.

@bmcorser
Copy link

bmcorser commented Oct 4, 2015

I was getting a bunch of explosions with npm install for this repo, but I can to run without erroring if I run npm install grunt-node-inspector beforehand as in node-inspector/v8-debug#7 (comment). That issue suggests that https://github.com/ChrisWren/grunt-node-inspector/ references an out of date node-inspector package ... is that what this PR sets out to resolve?

@bmcorser
Copy link

bmcorser commented Oct 4, 2015

Hmm seems like v4 isn't quite supported and I should go back to v0.12 ...

@lirantal
Copy link
Member Author

lirantal commented Oct 4, 2015

@bmcorser indeed.

@bmcorser
Copy link

bmcorser commented Oct 4, 2015

@lirantal 👍 ty

@lirantal
Copy link
Member Author

lirantal commented Oct 4, 2015

  1) User CRUD tests should be able to login successfully and logout successfully:
      Uncaught AssertionError: expected 'Found. Redirecting to /' to be 'Moved Temporarily. Redirecting to /'
      + expected - actual
      +"Moved Temporarily. Redirecting to /"
      -"Found. Redirecting to /"

The specific test that fails here is because NodeJS v4 changed their status codes for 302 from "Moved Temporarily" to "Found".

I was thinking to support both v4 and prior versions we can check for either of the strings, so I'll update the tests unless you have another idea.

@lirantal
Copy link
Member Author

lirantal commented Oct 4, 2015

Since the problem here is the actual nodejs version how about we have a case for each version in the test? i.e:

if (process.version.indexOf('v4'))
  signoutRes.text.should.equal('Found. Redirecting to /');
else // it's otherwise v0.12, or v0.11 then
  signoutRes.text.should.equal('Moved Temporarily. Redirecting to /');

WDYT?

@ilanbiala
Copy link
Member

@lirantal is it "v4" or "4."? I guess we can do that.

@lirantal
Copy link
Member Author

lirantal commented Oct 4, 2015

Cool, I'll make the changes and commit so we can see the CI tests pass.

@lirantal lirantal force-pushed the feature/travis-add-node-v4-gcc-update branch from 780735a to 353b7de Compare October 4, 2015 21:45
@lirantal
Copy link
Member Author

lirantal commented Oct 4, 2015

@ilanbiala node v4 is passing just fine now.

directories:
- node_modules/
- public/lib/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this get removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ilanbiala I removed it in the beginning when working on this PR for node v4 compatibility
I re-added it again now.

@codydaig
Copy link
Member

codydaig commented Oct 4, 2015

@lirantal It is failing on the e2e tests, but grunt is continuing and not producing the error too fail the build. Not sure if that is related or not.

@ilanbiala
Copy link
Member

Here is where things go awry: https://travis-ci.org/meanjs/mean/jobs/83604705#L1555

@lirantal lirantal force-pushed the feature/travis-add-node-v4-gcc-update branch from 353b7de to b2088e7 Compare October 5, 2015 07:16
@lirantal
Copy link
Member Author

lirantal commented Oct 5, 2015

The E2E test fails for both v0.10 and v0.12, it's not related to node v4.
I opened a separate issue to deal with it: #961

This PR LGTM to continue with.

@lirantal lirantal force-pushed the feature/travis-add-node-v4-gcc-update branch 2 times, most recently from 00182cf to 07d337e Compare October 5, 2015 07:33
@ilanbiala
Copy link
Member

LGTM, squash and merge!

@codydaig
Copy link
Member

codydaig commented Oct 5, 2015

LGTM

Thanks @lirantal!

updating grunt-node-inspector version to compatible version with nodejs v4
@lirantal lirantal force-pushed the feature/travis-add-node-v4-gcc-update branch from 07d337e to b7a57ab Compare October 6, 2015 11:09
@lirantal
Copy link
Member Author

lirantal commented Oct 6, 2015

Squashed and merged.
Thanks guys!

lirantal added a commit that referenced this pull request Oct 6, 2015
…update

NodeJS v4 support - fixing the failed build
@lirantal lirantal merged commit 3cfd978 into meanjs:master Oct 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants