[ 
https://issues.apache.org/jira/browse/TINKERPOP-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15352879#comment-15352879
 ] 

ASF GitHub Bot commented on TINKERPOP-1071:
-------------------------------------------

GitHub user dkuppitz opened a pull request:

    https://github.com/apache/tinkerpop/pull/348

    TINKERPOP-1071 Enhance pre-processor output

    
    https://issues.apache.org/jira/browse/TINKERPOP-1071
    
    To test the changes, I've added an invalid `foo + bar` line in one of the 
code blocks. Here's how the output looked like:
    
    ```
    $ bin/process-docs.sh 
    
    ==========================
    +   Installing Plugins   +
    ==========================
    
     * tinkerpop-sugar ... done
     * hadoop-gremlin ... done
     * spark-gremlin ... done
     * giraph-gremlin ... done
     * neo4j-gremlin ... done
    
    
    ============================
    +   Processing AsciiDocs   +
    ============================
    
     * source:   /projects/apache/tinkerpop/docs/src/reference/index.asciidoc
       target:   
/projects/apache/tinkerpop/target/postprocess-asciidoc/reference/index.asciidoc
       progress: 
[====================================================================================================]
 100%
    
     * source:   /projects/apache/tinkerpop/docs/src/reference/preface.asciidoc
       target:   
/projects/apache/tinkerpop/target/postprocess-asciidoc/reference/preface.asciidoc
       progress: 
[====================================================================================================]
 100%
    
     * source:   /projects/apache/tinkerpop/docs/src/reference/intro.asciidoc
       target:   
/projects/apache/tinkerpop/target/postprocess-asciidoc/reference/intro.asciidoc
       progress: 
[==========================================================================>    
                     ] 74%No such property: foo for class: groovysh_evaluate
    Display stack trace? [yN] pb(295); '----'
    groovysh_parse: 2: expecting an identifier, found 'this' @ line 2, column 
19.
       lities. In total, this is The TinkerPop.'
                         ^
    
    1 error
    Display stack trace? [yN] pb(395); '// LAST LINE'
    
    
    Last 10 lines of 
/projects/apache/tinkerpop/target/postprocess-asciidoc/reference/intro.asciidoc:
    
    ==>v[1]
    gremlin> g.V(marko).out('knows') //// <2>
    ==>v[2]
    ==>v[4]
    gremlin> g.V(marko).out('knows').values('name') //// <3>
    ==>vadas
    ==>josh
    gremlin> foo + bar
    gremlin> lities. In total, this is The TinkerPop.'
    gremlin> 
    
    xargs: /projects/apache/tinkerpop/docs/preprocessor/preprocess-file.sh: 
exited with status 255; aborting
    ```
    
    Unfortunately I cannot separate the error message from the progress bar 
output (both go to stderr), but I think  it already helps a lot to see the last 
10 lines of the output file.
    
    VOTE: +1

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

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

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

    https://github.com/apache/tinkerpop/pull/348.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 #348
    
----
commit 98f09bad615c2be3b5f8a4145f9a106977f13d6b
Author: Daniel Kuppitz <[email protected]>
Date:   2016-06-28T12:02:32Z

    Enhanced pre-processor output for failure cases.

----


> Enhance pre-processor output
> ----------------------------
>
>                 Key: TINKERPOP-1071
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1071
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 3.0.2-incubating
>            Reporter: Daniel Kuppitz
>            Assignee: Daniel Kuppitz
>            Priority: Minor
>
> If the pre-processor recognizes an error, it will currently just cancel the 
> process and remove the partially processed file. That makes it hard to figure 
> out why it actually failed. Would be nice if the pre-processor would show the 
> last 10 lines of the partially processed file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to