You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by spmallette <gi...@git.apache.org> on 2015/12/29 19:48:31 UTC

[GitHub] incubator-tinkerpop pull request: TINKERPOP-1055 Gremlin Console F...

GitHub user spmallette opened a pull request:

    https://github.com/apache/incubator-tinkerpop/pull/188

    TINKERPOP-1055 Gremlin Console FileNotFoundException can be misleading

    https://issues.apache.org/jira/browse/TINKERPOP-1055
    
    Some relatively minor refactoring required to get this working.  Tested manually only as I wasn't sure how to write tests around the console when it was calling `System.exit(1)` on error.  I first tested a "good" script:
    
    ```text
    $ cat test.groovy
    x=1
    addItUp = {x,y -> x+y}
    
    $ bin/gremlin.sh test.groovy
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    ==>1
    ==>groovysh_evaluate$_run_closure1@5536379e
    gremlin> addItUp(1,10)
    ==>11
    ```
    
    Then I tested a script that wasn't present on the file system:
    
    ```text
    $ bin/gremlin.sh test1.groovy
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    Gremlin initialization file not found at [test1.groovy].
    ```
    
    Finally, I tested a script with an error in the script itself:
    
    ```text
    
    $ cat test-fail.groovy
    x = 1
    y = x / 0
    
    $ bin/gremlin.sh test-fail.groovy
    
             \,,,/
             (o o)
    -----oOOo-(3)-oOOo-----
    plugin activated: tinkerpop.server
    plugin activated: tinkerpop.utilities
    plugin activated: tinkerpop.tinkergraph
    ==>1
    Bad line in Gremlin initialization file at [y = x / 0] - Division by zero
    ```
    
    
    VOTE: +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-1055

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-tinkerpop/pull/188.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #188
    
----
commit 1f6cb945c5ed0171a502c6468a648e8063fa1bef
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2015-12-29T18:41:22Z

    Better error reporting around gremlin.sh init script.
    
    Refactored code a bit to catch exceptions related to IO on the init script itself versus errors in line of code evaluation. Not sure how to write tests here since we call System.exit(1) on error.

commit 5463bd9cff76624067994e2469047d5ebbb305b6
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2015-12-29T18:44:11Z

    Update changelog.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP-1055 Gremlin Console F...

Posted by okram <gi...@git.apache.org>.
Github user okram commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/188#issuecomment-167879521
  
    VOTE +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP-1055 Gremlin Console F...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-tinkerpop/pull/188


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-tinkerpop pull request: TINKERPOP-1055 Gremlin Console F...

Posted by twilmes <gi...@git.apache.org>.
Github user twilmes commented on the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/188#issuecomment-167874962
  
    Looking good.
    
    VOTE: +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---