lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Parkes (JIRA)" <>
Subject [jira] Commented: (LUCENE-814) javacc on Win32 (cygwin) creates wrong line endings - fix them with 'ant replace'
Date Thu, 01 Mar 2007 23:44:50 GMT


Steven Parkes commented on LUCENE-814:

I've attached a patch that has the fixcrlf tasks (I wanted to check them under cygwin, to
see if they work with mixed crlf/lf files, not just all crlf or all lf.)  This seems to give
the correct results on both windows/cygwin and linux.

To Chris's comment: even if you do everything in cygwin, you'll get mixed output files because
cygwin doesn't have any impact on java. Cygwin doesn't include java in anyway: you use the
normal windows binaries. cygwin bash can call java, javac, ant, etc., but the windows java
binaries still don't know anything about cygwin's crlf/lf mapping stuff.

And just to make things more confusing, it is possible to install cygwin in "dos mode' where
it (supposedly) uses crlf rather lf. I have no experience with this. I did go so far as to
try to install it this way to test but failed miserably: the two installations fought with
each other, so I gave up. I  haven't heard of anyone running cygwin in crlf mode anyway.

> javacc on Win32 (cygwin) creates wrong line endings - fix them with 'ant replace'
> ---------------------------------------------------------------------------------
>                 Key: LUCENE-814
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: Build
>         Environment: Windows, Cygwin
>            Reporter: Doron Cohen
>         Assigned To: Doron Cohen
>            Priority: Minor
>             Fix For: 2.2
>         Attachments: 814.javacc.line.ends.patch, LUCENE-814.txt
> "ant javacc" in Windows/Cygwin generates files with wrong line endings (\r  or \r\n instead
of *Nix's \n). 
> I managed to get rid of those using    perl -p -e 's/(\r\n|\n|\r)/\n/g'
> Some useful info on line ending issues is in
> After wasting some time to get rid of those, I modified javacc-QueryParser build.xml
task to take care of that.
> So now QueryParser files created with "ant javacc" are fixed (if required) to have \n
as line ends.
> Should probably do that also for the other javacc targets: javacc-HTMLParser and javacc-StandardAnalyzer(?)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message