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

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

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

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

mattrobenolt opened this issue Mar 11, 2013 · 21 comments

Comments

@mattrobenolt
Copy link

https://github.com/mattrobenolt/raven-node/blob/master/.travis.yml

Gets picked up as 0.1

See: https://travis-ci.org/mattrobenolt/raven-node/jobs/5415175

@ghost
Copy link

ghost 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
Copy link
Author

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

@roidrage
Copy link
Contributor

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

@mattrobenolt
Copy link
Author

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

@roidrage
Copy link
Contributor

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

@mattrobenolt
Copy link
Author

Oh, screw that then. :) 👍

@roidrage
Copy link
Contributor

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

@mattrobenolt
Copy link
Author

@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
Copy link
Contributor

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
Copy link
Author

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. :)

@ghost
Copy link

ghost commented Mar 11, 2013

@mattrobenolt

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

Don't you mean recommend using strings for versions?

@ghost
Copy link

ghost commented Mar 11, 2013

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

@roidrage
Copy link
Contributor

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

@mattrobenolt
Copy link
Author

@naomik Yes. I'm bad at typing.

getsentry/raven-node@82d6155

@Leonidas-from-XIV
Copy link

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

@joshk
Copy link
Contributor

joshk commented Mar 13, 2013

http://about.travis-ci.org/docs/user/languages/javascript-with-nodejs/#Choosing-Node-versions-to-test-against

Remember to use quotes, otherwise the version is interpreted as a float, and 0.10 is just 0.1

On 14/03/2013, at 9:54 AM, Marek Kubica notifications@github.com wrote:

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


Reply to this email directly or view it on GitHub.

@MiguelMadero
Copy link

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

@sarahhodne
Copy link
Contributor

@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
Copy link

I'm using quotes as mentioned on the thread. I tried
"0.10"MiguelMadero/geddy@871ce0c7c714d9e469164ebd6e0ddb5d216e4592and
"0.10.x"MiguelMadero/geddy@a94e98a
and
neither of those worked.

You can see builds number 3, 5, 6 and 7 of
geddyhttps://travis-ci.org/MiguelMadero/geddy/builds.
All of them were loading rvm. What's weird is that build 7 didn't include
"0.10" and was still trying to load rvm....

Thanks,
Miguel

Miguel

On Sat, Apr 27, 2013 at 12:13 AM, Henrik Hodne notifications@github.comwrote:

@MiguelMadero https://github.com/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?


Reply to this email directly or view it on GitHubhttps://github.com//issues/977#issuecomment-17109452
.

@roidrage
Copy link
Contributor

@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
Copy link

Wow, that's odd, I didn't know YAML was so picky. And I didn't realized the
diference usually SublimeText picks infers these settings from the file,
but I guess it didn't have enough context to change my tab to two spaces.

Anyway, it's working now (geddy build 9.1 uses node
0.10https://travis-ci.org/MiguelMadero/geddy).
Thanks

Miguel

On Sat, Apr 27, 2013 at 10:27 AM, Mathias Meyer notifications@github.comwrote:

@MiguelMadero https://github.com/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.


Reply to this email directly or view it on GitHubhttps://github.com//issues/977#issuecomment-17119877
.

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

6 participants