Skip to content

Fails to detect Node 0.10 in .travis.yml #977

Closed
mattrobenolt opened this Issue Mar 11, 2013 · 21 comments

7 participants

@naomik
naomik commented Mar 11, 2013

Well, for what it's worth, it's not a supported version yet

http://about.travis-ci.org/docs/user/ci-environment/#Node.js-versions

I was bellyaching this morning because I couldn't get a module to build against 0.9.12 :S

@mattrobenolt

@naomik, while that is true, the error is in detecting the version number. It's being detected as 0.1, not 0.10.

@roidrage
Travis CI member

Just looked through the code, and our YAML parser indeed has issues parsing the two decimals. Looking into it.

@mattrobenolt

@roidrage Can you point me in the right direction for that? I'll take a stab at fixing it.

@roidrage
Travis CI member

No worries, this is an issue with the underlying YAML parser :)

@mattrobenolt

Oh, screw that then. :) :+1:

@roidrage
Travis CI member

Seems like dtao/safe_yaml#26 should fix the issue. Trying it out.

@mattrobenolt

@roidrage So it appears that the YAML parser is correct. 0.10 as a number is 0.1. It strips the trailing 0 because, well, that's how numbers work. Versions aren't numbers and can't be treated as such, so the documentation should be updated to reflect that and not recommend using numbers anymore. :)

I double checked, and it doesn't recommend numbers for Python. It seems that node.js was the oddball out.

http://about.travis-ci.org/docs/user/languages/javascript-with-nodejs/

@roidrage
Travis CI member

The issue is more that this happens with other languages as well, e.g. Perl 5.10 vs. 5.1. An earlier version of the YAML parser we used was able to make that distinction, so it's good you've brought it up.

One possible workaround is to just put the number in as a string:

node_js:
  - "0.10"

Not great, but might be a valid temporary workaround.

@mattrobenolt

Yep, and I did that and it worked fine (aside from the fact that there is no 0.10 binary yet). All around, I'd just recommend using numbers for versions. :)

@naomik
naomik commented Mar 11, 2013

@mattrobenolt

All around, I'd just recommend using numbers for versions. :)

Don't you mean recommend using strings for versions?

@naomik
naomik commented Mar 11, 2013

Do we have any idea when the 0.10.0 binary will be available?

@roidrage
Travis CI member

naomik: we're working on it. cc @joshk :)

@Leonidas-from-XIV

Seems to be working now. It even picks up 0.1 as 0.10. Not the best practice in any case.

@joshk
Travis CI member
joshk commented Mar 13, 2013
@MiguelMadero

I'm still having the same issue. Is this supposed to be working now?

@henrikhodne
Travis CI member

@MiguelMadero This should indeed be working. Are you listing the node version as "0.10" (and not 0.10)? The quotes are needed as YAML will parse the version as a decimal number otherwise, and 0.10 == 0.1.

If this is not the issue, could you please link us to the build you're seeing the issue on?

@MiguelMadero
@roidrage
Travis CI member

@MiguelMadero There's a tab in your .travis.yml (in the line that says "0.10") which makes it illegal YAML and makes Travis ignore your build settings.

@MiguelMadero
@willm willm pushed a commit to willm/node-7digital-api that referenced this issue Dec 16, 2013
@raoulmillais raoulmillais Quote node version for travis ca4bf85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.