Need reviewer on addition of whitespace normalizer script
Dmitry Samersoff
Dmitry.Samersoff at oracle.com
Fri Mar 2 17:01:23 UTC 2012
Kelly,
As far as I agree that plain tab should not be used within string
constant I'm against of adding script that have clear visible bug in it.
-Dmitry
On 2012-03-02 20:56, Kelly O'Hair wrote:
>
> On Mar 1, 2012, at 11:52 PM, Dmitry Samersoff wrote:
>
>> Kelly,
>>
>> 1.
>> Why perl? As far as I know this it the only dependency to perl
>> in build system.
>>
>> I think we have to count and minimize set of third-party
>> utilities and interpreters we are using. So I'm for python -
>> mercurial marry us with it.
>
> This script is not part of the build process, it is simply a script that might be handy
> for a developer, it is 'user beware' and all changes it makes on files should be reviewed
> by the user.
> It is perl because that's what the original author wrote it in, and I saw no need to spend
> the time to convert it. It has proven to be a reliable and accurate script for me.
>
> Since it was the actual script used to originally normalize the OpenJDK sources, I felt that
> it was warranted to add 'as is'. If someone wants to also provide a Python or bash script
> I certainly won't block that addition.
>
>>
>> 2.
>> This script doesn't check for literal.
>>
>> I.e. if we have string constant with tab inside script brake it. Also
>> this script brakes multiline constants if we use it for languages that
>> allow it.
>
> There were several places in the JDK sources that did have tabs in literal strings when we
> did the original normalization, in all cases they were mistakes in the java code and it was
> unintentionally done by the original authors of that code.
> There were no instances of anyone needing an actual TAB character in the source files.
>
> -kto
>
>>
>> -Dmitry
>>
>> On 2012-03-02 01:32, Kelly O'Hair wrote:
>>>
>>> Need reviewer. Adding the whitespace normalizer script as a convenience to the jdk developers.
>>>
>>> 6625113: Add the normalize and rmkw perl script to the openjdk repository or openjdk site?
>>> http://cr.openjdk.java.net/~ohair/openjdk8/normalizer-script/webrev/
>>>
>>> Probably a little history is warranted here. This script was originally written to normalize the
>>> whitespace in the jdk7 sources as they entered the Mercurial repositories in "changeset 0".
>>> It's been modified since then very slightly. I can't recall who wrote it (please speak up if you know)
>>> but it has been a valuable tool and I've had this CR to add it to the make/scripts directory for some time.
>>>
>>> The SCCS keyword removed (rmkw) was less useful, and I decided that it did not deserve being added.
>>>
>>> Why whitespace normalization? This was decided a long time ago when we had a raft of complaints from
>>> people viewing the sources with different tools and getting different views based on the TABs and trailing
>>> blanks or trailing newlines. So we decided to normalize on no TABs, no trailing blanks on lines, and
>>> no more than one blank line at the end of the file. This script was used to do that normalization.
>>>
>>> -kto
>>>
>>
>>
>> --
>> Dmitry Samersoff
>> Java Hotspot development team, SPB04
>> * There will come soft rains ...
>
--
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...
More information about the build-dev
mailing list