ant precommit fails on .adoc files

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ant precommit fails on .adoc files

s_ge
Hi All

 

I've checked out lucene-solr project, branch "branch_8x"

 

When I run "ant precommit" at project root, I get these validation errors on "analytics.adoc" file.  Has anyone seen these before, and if you knew of a fix?

 

My env

 - windows 10 pro

 - jdk 1,8_221

 - ant 1.10.6 compiled on May 2 201

 

Below is the error in console.

 

Thanks!

Steve

 

 

----------------------

 

rat-sources-typedef:

[ivy:cachepath] :: resolving dependencies :: org.apache.rat#apache-rat-caller;working [not transitive]

[ivy:cachepath]         confs: [master]

[ivy:cachepath]         found org.apache.rat#apache-rat;0.11 in public

[ivy:cachepath] :: resolution report :: resolve 46ms :: artifacts dl 1ms

        ---------------------------------------------------------------------

        |                  |            modules            ||   artifacts   |

        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|

        ---------------------------------------------------------------------

        |      master      |   1   |   0   |   0   |   0   ||   1   |   0   |

        ---------------------------------------------------------------------

 

validate-source-patterns:

[source-patterns] Unescaped symbol "->" on line #46: solr/solr-ref-guide/src/analytics.adoc

[source-patterns] Unescaped symbol "->" on line #55: solr/solr-ref-guide/src/analytics.adoc

 

BUILD FAILED

C:\development\workspace-eclipse-photon\loc-projects\lucene-solr-cdg\build.xml:128: Found 2 violations in source files (Unescaped symbol "->" on line #46, Unescaped symbol "->" on line #55).

 

Total time: 25 seconds

 

 

Reply | Threaded
Open this post in threaded view
|

Re: ant precommit fails on .adoc files

Chris Hostetter-3

This is strange -- I can't reproduce, and I can't see any evidence of a
change to explain why this might have been failing 8 days ago but not any
more.

Are you still seeing this error?

The lines in question are XML comments inside of (example) code blocks (in
the ref-guide source), which is valid and the
'checkForUnescapedSymbolSubstitutions' groovy function that generates the
error below already has allowances for this posibility.

(normally putting '->' in asciidoctor source files is a bad idea and
renders as giberish, which is why we have this check)


I wonder if it's possible that something in the local ENV where you are
running ant is causing the groovy regex patterns to be evaluated
differently? (ie: mismatched unix/windows line endings, LANG that doesn't
use UTF-8, etc...)




: I've checked out lucene-solr project, branch "branch_8x"

: When I run "ant precommit" at project root, I get these validation
: errors on "analytics.adoc" file.  Has anyone seen these before, and if
: you knew of a fix?

: validate-source-patterns:
:
: [source-patterns] Unescaped symbol "->" on line #46: solr/solr-ref-guide/src/analytics.adoc
:
: [source-patterns] Unescaped symbol "->" on line #55: solr/solr-ref-guide/src/analytics.adoc


-Hoss
http://www.lucidworks.com/
Reply | Threaded
Open this post in threaded view
|

Re: ant precommit fails on .adoc files

johngqjiang
I have the same problem:

validate-source-patterns:
[source-patterns] Unescaped symbol "->" on line #46:
solr/solr-ref-guide/src/analytics.adoc
[source-patterns] Unescaped symbol "->" on line #55:
solr/solr-ref-guide/src/analytics.adoc



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: ant precommit fails on .adoc files

Shawn Heisey-2
In reply to this post by Chris Hostetter-3
On 10/8/2019 5:37 PM, Chris Hostetter wrote:
> This is strange -- I can't reproduce, and I can't see any evidence of a
> change to explain why this might have been failing 8 days ago but not any
> more.

On the master branch that I just updated, "ant clean precommit" fails.
Looks like it had a problem with the options being used on the javadoc
command:

   [javadoc] javadoc: error - invalid flag: --no-module-directories

This is Ubuntu 18 with OpenJDK 11.0.4.

Switching to branch_8x and OpenJDK 8u222 on the same system, since
branch_8x is where the OP was working, precommit passes.

Looking again at the original post, I see that it's running on Windows.
So I tried it on Windows 10 Pro with Oracle JDK 8u212.  It failed just
like the OP stated, validating source for the ref guide.

I tried once to build a Solr package on Windows.  It didn't work,
requiring tools that are not normally found on Windows.  What I found
for this thread seems to indicate that the source validation for the ref
guide does not work correctly either.  I would be interested in finding
out whether or not we expect the build system to work right on Windows.
I suspect that it is not supported.

Thanks,
Shawn
Reply | Threaded
Open this post in threaded view
|

Re: ant precommit fails on .adoc files

Cassandra Targett
On Oct 29, 2019, 10:44 AM -0500, Shawn Heisey <[hidden email]>, wrote:
>
> I tried once to build a Solr package on Windows. It didn't work,
> requiring tools that are not normally found on Windows. What I found
> for this thread seems to indicate that the source validation for the ref
> guide does not work correctly either. I would be interested in finding
> out whether or not we expect the build system to work right on Windows.
> I suspect that it is not supported.
>

Just to be clear, the error from the original poster was thrown from the ‘validate-source-patterns’ task, which is a dependency of the ‘validate’ task of precommit and doesn’t use the Ref Guide tooling. It just happened to dislike something it found in a file that happens to be used for the Ref Guide.

Ref Guide validation, where the Ref Guide tooling is used, happens in the ‘documentation’ task so the culprit here is more likely the Rat tooling that’s used to validate all source files.

Cassandra