Skip to content

Build broken when it wasn't before, possible coffee-script error #938

Closed

Description

I got this error when compiling 1.4.5 (cannot build 1.5.x there, so sticking with 1.4.5) on CentOS:

    [21/30] COFFEE drivers/javascript/src/errors.coffee -> drivers/javascript/build/coffee/errors.js
drivers/javascript/src/errors.coffee:51:21: error: cannot use own with for-in
        for own key,arg in term.optargs
                    ^^^

The same config built fine before, so the culprit is probable coffeescript 1.6.3 release on June 2nd (yesterday in time of writing this issue).

Activity

  1. ghost assigned on Jun 3, 2013
  2. mglukhovsky commented on Jun 3, 2013

    @mglukhovsky
    Member

    @wmrowan, @neumino, @AtnNn, could you take a look at this?

    Unfortunately, it seems like we're often at the mercy of CS compiler changes (which seem to break fairly often). I don't see an issue for this on the coffeescript repo, but in the meantime, you can always try the source distribution that has most of these assets precompiled: http://download.rethinkdb.com/dist/

    Also, quick question: I don't see another issue reported for build problems on CentOS with 1.5. What problem are you encountering when trying to build 1.5 (besides the coffeescript issue)?

  3. neumino commented on Jun 3, 2013

    @neumino
    Member

    I haven't try CS 1.6.3 yet. I'll give a shot later today. I'll check the web ui too, just in case something is broken too.

    About CentOS, I could build with the latest version of CentOS, but couldn't use tcmalloc. I didn't have enough time to keep digging, but for now these instructions should work for 1.5.x.
    We'll put this on the website pretty soon. I still have a few things to update before releasing the new docs.


    Installing RethinkDB on CentOS

    CentOS does not provide a v8-devel package and node.js. We can get it from the Epel repository.

    sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    

    Install main dependencies.

    sudo yum install git-core boost-static m4 gcc-c++ python-pip v8-devel nodejs npm
    

    Install node dependencies.

    sudo npm install -g coffee-script less handlebars
    

    Install pyyaml

    sudo python-pip install pyyaml
    

    Get the source code

    Clone RethinkDB repository.

    git clone --depth 1 https://github.com/rethinkdb/rethinkdb.git
    

    Build RethinkDB

    We did not install the protobuf libraries, so fetch them through the build process.
    The library tcmalloc throws some error. You can build with the flag --without-tcmalloc for now. We will provide a fix for that as soon as possible.

    ./configure --without-tcmalloc --fetch protoc --fetch protobuf
    make
    

    If you want to build faster and use multiple cores, you will have to use this command to avoid a bug in make (see #475)

    `make command-line` -j3
    
  4. wmrowan commented on Jun 3, 2013

    @wmrowan
    Contributor

    Well that looks like a pretty annoying change to the compiler. @neumino have we tried compiling more recent builds with Coffee 1.6.3?

  5. neumino commented on Jun 3, 2013

    @neumino
    Member

    @wmrowan I don't think we have try (at least I haven't try yet).

    @wmrowan It also seems to be a bug in composeCarrots. in errors.coffee
    It should be

    for own key, arg of term.optargs
    

    I don't see anything related to the for loop in the changelog (http://coffeescript.org/#changelog), so I guess the compiler just became a little more strict.

  6. neumino commented on Jun 3, 2013

    @neumino
    Member

    So I just built with CoffeeScript 1.6.3 without any problem on my Arch laptop (node v0.10.7, npm 1.2.21).

    @Herby what version of node are you running?

  7. neumino commented on Jun 3, 2013

    @neumino
    Member

    The line that breaks on your system is still there on 1.5 (the for own key, arg in term.optargs)

    I have a VM at home with CentOS, I'll give a shot tonight.

  8. coffeemug commented on Jun 6, 2013

    @coffeemug
    Contributor

    I just installed coffee 1.6.3 on OS X and I get this error, FYI :(

  9. ghost assigned on Jun 6, 2013
  10. neumino commented on Jun 6, 2013

    @neumino
    Member

    Reassigning to @wmrowan. The bug is in the driver.

    It should be a one line fix, but I'm not familiar with the drivers tests.

  11. wmrowan commented on Jun 6, 2013

    @wmrowan
    Contributor

    It appears that coffeescript isn't the only hip JS tool to have made a breaking update recently. In upgrading CS I also incidentally upgraded less and now get this error when trying to compile rethinkdb:

    [1/1] LESSC build/release/rethinkdb_web_assets/cluster.css
    ParseError: Unrecognised input in /home/wmrowan/rethinkdb/admin/static/less/bootstrap/mixins.less on line 523, column 7:
    522     .spanX (@index) when (@index > 0) {
    523       (~".span@{index}") { .span(@index); }
    524       .spanX(@index - 1);
    
  12. AtnNn commented on Jun 6, 2013

    @AtnNn
    Member

    I think I should add strict upper bounds to the configure script.

  13. wmrowan commented on Jun 6, 2013

    @wmrowan
    Contributor

    I upgraded to 1.6.3 but was not able to reproduce this (on Elementary OS 0.2). I did fix the underlying syntax error behind this compilation problem though (OTS review by Michel). @coffeemug can you pull from next and try to build with the fix?

  14. coffeemug commented on Jun 7, 2013

    @coffeemug
    Contributor

    I tested it and it works for me. @wmrowan -- please have another person verify this and feel free to close when you have confirmation.

  15. wmrowan commented on Jun 7, 2013

    @wmrowan
    Contributor

    @Herby Since I know you can't compile 1.5.x, I've cherry picked the change into the v1.4.x branch. This the only modification to the v1.4.x branch since 1.4.5 was released. Could you try compiling v.14.x and let me know if it solves your problem?

  16. neumino commented on Jun 9, 2013

    @neumino
    Member

    These versions of the libraries
    Less 1.3 -- 1.4 is known to have issues with our current version of bootstrap
    Handlebars 1.0.7 -- >= 1.0.8 is known to have issues with the {../id} syntax in the table view
    CoffeeScript 1.6.3 -- 1.5, 1.6 and 1.6.1 are know to have bug (CS bugs, fixed in 1.6.2 and later).

  17. neumino commented on Jun 9, 2013

    @neumino
    Member

    Sorry for all the troubles @Herby.

    We are going to improve all the web assets build process, see #958.
    I'm closing this issue since #958 has a little more information on what we are going to do to improve all this build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions