From 794759e2523ee58f6e46b5d98f4e45d09d6dd990 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Mon, 28 Sep 2020 13:08:52 -0700 Subject: [PATCH] updates for next release --- CHANGES.md | 15 +++++++------- MANIFEST | 2 ++ bin/perltidy | 2 +- docs/BugLog.html | 24 ++++++++++++++++++++-- docs/ChangeLog.html | 17 +++++++-------- docs/Tidy.html | 2 +- docs/perltidy.html | 2 +- lib/Perl/Tidy.pm | 2 +- lib/Perl/Tidy.pod | 2 +- lib/Perl/Tidy/Debugger.pm | 2 +- lib/Perl/Tidy/DevNull.pm | 2 +- lib/Perl/Tidy/Diagnostics.pm | 3 ++- lib/Perl/Tidy/FileWriter.pm | 3 ++- lib/Perl/Tidy/Formatter.pm | 5 +++-- lib/Perl/Tidy/HtmlWriter.pm | 5 +++-- lib/Perl/Tidy/IOScalar.pm | 3 ++- lib/Perl/Tidy/IOScalarArray.pm | 3 ++- lib/Perl/Tidy/IndentationItem.pm | 3 ++- lib/Perl/Tidy/LineBuffer.pm | 3 ++- lib/Perl/Tidy/LineSink.pm | 3 ++- lib/Perl/Tidy/LineSource.pm | 3 ++- lib/Perl/Tidy/Logger.pm | 3 ++- lib/Perl/Tidy/Tokenizer.pm | 2 +- lib/Perl/Tidy/VerticalAligner.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Alignment.pm | 4 ++-- lib/Perl/Tidy/VerticalAligner/Line.pm | 6 +++--- local-docs/BugLog.pod | 5 +++-- local-docs/Release-Checklist.md | 1 + 28 files changed, 83 insertions(+), 46 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0ca916b3..29a3b6a7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,13 @@ # Perltidy Change Log -## 2020 09 07.01 +## 2020 10 01 + + - Robustness of perltidy has been significantly improved. Updating is recommended. Continual + automated testing runs began about 1 Sep 2020 and numerous issues have been found and fixed. + Many involve references to uninitialized variables when perltidy is fed random text and random + control parameters. A complete list is given in the file + + https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod - Added the token '->' to the list of alignment tokens, as suggested in git #39, so that it can be vertically aligned if a space is placed before them with -wls='->'. @@ -12,12 +19,6 @@ - Added keyword 'isa'. - - Numerous issues have been found during automated testing and fixed. Many involve references to - uninitialized variables when perltidy is given random text. A complete list is given in - the file - - https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod - ## 2020 09 07 - Fixed bug git #37, an error when the combination -scbb -csc was used. diff --git a/MANIFEST b/MANIFEST index 0a3137dd..c0347468 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3,6 +3,7 @@ bin/perltidy BUGS.md CHANGES.md COPYING +docs/BugLog.html docs/ChangeLog.html docs/index.html docs/index.md @@ -70,6 +71,7 @@ t/snippets19.t t/snippets2.t t/snippets20.t t/snippets21.t +t/snippets22.t t/snippets3.t t/snippets4.t t/snippets5.t diff --git a/bin/perltidy b/bin/perltidy index 12d6a3f4..b1b7d890 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -4283,7 +4283,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20200907.01 +This man page documents perltidy version 20201001 =head1 BUG REPORTS diff --git a/docs/BugLog.html b/docs/BugLog.html index 25494409..476bbf36 100644 --- a/docs/BugLog.html +++ b/docs/BugLog.html @@ -21,6 +21,22 @@
+
Keep any space between a bareword and quote
+
+ +

In random testing, the -mangle option introduced a syntax error by deleting the space between barewords and quotes (test file 'MxScreen'), such as:

+ +
  oops"Your login, $Bad_Login, is not valid";
+ +

Sub 'is_essential_whitespace' was updated to prevent this on 27 Sep 2020, in 'keep any space between a bareword and quote', f32553c.

+ +
+
Fixed some incorrect indentation disagreements reported in LOG file
+
+ +

The .LOG file reports any disagreements between the indentation of the input and output files. This can help locate brace errors. These were incorrect when some of the options were used, including --whitespace-cycle, -bbhb, -nib. This was corrected 24 Sep 2020, 'fixed incorrect log entry for indentation disagreement', 3d40545. At the same time, locations of closing brace indentation disagreements are now tracked and reported in the .ERR file when there is a brace error. This can help localize the error if the file was previously formatted by perltidy.

+ +
If an =cut starts a POD section within code, give a warning
@@ -30,13 +46,17 @@
Switched from using an eval block to the -can() function for sub finish_formatting>
-

This is not a bug, but is cleaner coding and insures that error messages get reported. This change was made 20 Sep 2020.

+

This is not a bug, but is cleaner coding and insures that error messages get reported. This change was made 20 Sep 2020, 'switch from eval { } to ->can('finish_formatting')', 28f2a4f.

fixed uninitialized value reference
-

The following message was generated during automated testing Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12079. Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12089. Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12097.

+

The following message was generated during automated testing

+ +
 Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12079.
+ Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12089.
+ Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12097.

The problem could be simplified to running perltidy -wn on this snippet:

diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 247b8b18..1322e7af 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,8 +1,15 @@

Perltidy Change Log

-

2020 09 07.01

+

2020 10 01

-
- Added the token '->' to the list of alignment tokens, as suggested in git
+
- Robustness of perltidy has been significantly improved.  Updating is recommended. Continual 
+  automated testing runs began about 1 Sep 2020 and numerous issues have been found and fixed. 
+  Many involve references to uninitialized variables when perltidy is fed random text and random
+  control parameters. A complete list is given in the file 
+
+       https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
+
+- Added the token '->' to the list of alignment tokens, as suggested in git
   #39, so that it can be vertically aligned if a space is placed before them with -wls='->'.
 
 - Added parameters -bbhb=n (--break-before-hash-brace=n), -bbsb=n (--break-before-square-bracket=n),
@@ -11,12 +18,6 @@
   control indentation of these tokens.
 
 - Added keyword 'isa'.
-
-- Numerous issues have been found during automated testing and fixed. Many involve references to
-  uninitialized variables when perltidy is given random text. A complete list is given in
-  the file 
-
-       https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
 

2020 09 07

diff --git a/docs/Tidy.html b/docs/Tidy.html index 70770128..d484ed58 100644 --- a/docs/Tidy.html +++ b/docs/Tidy.html @@ -372,7 +372,7 @@

VERSION

-

This man page documents Perl::Tidy version 20200907.01

+

This man page documents Perl::Tidy version 20201001

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index f5887ec8..95d6455c 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -3313,7 +3313,7 @@

VERSION

-

This man page documents perltidy version 20200907.01

+

This man page documents perltidy version 20201001

BUG REPORTS

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 792dd77e..f5d25532 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -107,7 +107,7 @@ BEGIN { # Release version must be bumped, and it is probably past time for a # release anyway. - $VERSION = '20200907.01'; + $VERSION = '20201001'; } sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 6c41ddb5..922766b1 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -432,7 +432,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t =head1 VERSION -This man page documents Perl::Tidy version 20200907.01 +This man page documents Perl::Tidy version 20201001 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index fef6ee58..96ad3f3f 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub new { diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm index 34c65e26..19dab097 100644 --- a/lib/Perl/Tidy/DevNull.pm +++ b/lib/Perl/Tidy/DevNull.pm @@ -7,7 +7,7 @@ package Perl::Tidy::DevNull; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub new { my $self = shift; return bless {}, $self } sub print { return } sub close { return } diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index 7362dc17..1d97be6f 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -20,7 +20,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -42,6 +42,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 0a470444..2aa8f66e 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -29,6 +29,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 21cf3ba9..819a1087 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -46,7 +46,7 @@ use warnings; { #<<< A non-indenting brace to contain all lexical variables use Carp; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; # The Tokenizer will be loaded with the Formatter ##use Perl::Tidy::Tokenizer; # for is_keyword() @@ -11983,10 +11983,11 @@ sub set_continuation_breaks { # $forced_breakpoint_to_go[$i] # may be updated to be =1 for any index $i after which there must be # a break. This signals later routines not to undo the breakpoint. - use constant DEBUG_BREAKPOINTS => 0; my ( $self, $saw_good_break ) = @_; + use constant DEBUG_BREAKPOINTS => 0; + my @i_first = (); # the first index to output my @i_last = (); # the last index to output my @i_colon_breaks = (); # needed to decide if we have to break at ?'s diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index 62bc7541..7c74c30f 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::HtmlWriter; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; use File::Basename; @@ -44,7 +44,7 @@ sub AUTOLOAD { # some diagnostic information. This sub should never be called # except for a programming error. our $AUTOLOAD; - return if ($AUTOLOAD eq 'DESTROY'); + return if ( $AUTOLOAD eq 'DESTROY' ); my ( $pkg, $fname, $lno ) = caller(); print STDERR < @@ -36,7 +37,7 @@ a -dp flag and it took some time to understand the results because of the lack o =item Bcan() function for sub finish_formatting> This is not a bug, but is cleaner coding and insures that error messages get reported. -This change was made 20 Sep 2020. +This change was made 20 Sep 2020, 'switch from eval { } to ->can('finish_formatting')', 28f2a4f. =item B diff --git a/local-docs/Release-Checklist.md b/local-docs/Release-Checklist.md index bb4794d9..ceeb03b3 100644 --- a/local-docs/Release-Checklist.md +++ b/local-docs/Release-Checklist.md @@ -3,6 +3,7 @@ - review tickets at [rt.cpan.org](https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Tidy) - review the issues at [github](https://github.com/perltidy/perltidy/issues/) - compare the new version with previous version on all files in test area +- run random testing on final version for a significant time before releasing (several days) - run 'author tests' on a much larger body of code than is covered by the .t files. - compare results of the current version with previous version -- 2.39.5