]> git.donarmstrong.com Git - perltidy.git/commitdiff
update bug logfile
authorSteve Hancock <perltidy@users.sourceforge.net>
Sat, 12 Sep 2020 23:19:34 +0000 (16:19 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sat, 12 Sep 2020 23:19:34 +0000 (16:19 -0700)
docs/Makefile
local-docs/BugLog.pod [new file with mode: 0644]

index e080da96359c1da99d4f06bcb4d90a4f1c788906..288361a9a54ec97e0df4ae47ce371fcb34e749d8 100644 (file)
@@ -2,6 +2,7 @@
 all:
        pod2html ../local-docs/stylekey.pod >stylekey.html
        pod2html ../local-docs/tutorial.pod >tutorial.html
+       pod2html ../local-docs/BugLog.pod >BugLog.html
        markdown ../INSTALL.md >INSTALL.html
        markdown ../CHANGES.md >ChangeLog.html
        pod2html ../bin/perltidy >perltidy.html
diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod
new file mode 100644 (file)
index 0000000..5ed1b3d
--- /dev/null
@@ -0,0 +1,231 @@
+=head1 Issues fixed after release 20200907
+
+This is a log of bugs found and fixed since the release 20200907. All were
+found with the help of automated random testing.
+
+=over
+
+=item B<uninitialized index referenced>
+
+An unitialized index was referenced when running on a file of randomly generated text:
+
+  Use of uninitialized value $K_oo in subtraction (-) at /home/steve/bin/Perl/Tidy/Formatter.pm line 7259.
+
+This was fixed 12 Sep 2020.
+
+=item B<Oops message triggered>
+
+The parameter combination -lp -wc triggered an internal bug message from perltidy:
+
+ 398: Program bug with -lp.  seqno=77 should be 254 and i=1 should be less than max=-1
+ 713: The logfile perltidy.LOG may contain useful information
+ 713: 
+ 713: Oops, you seem to have encountered a bug in perltidy.  Please check the
+ 713: BUGS file at http://perltidy.sourceforge.net.  If the problem is not
+ 713: listed there, please report it so that it can be corrected.  Include the
+ ...
+
+The problem is that the parameters --line-up-parentheses and
+--whitespace-cycle=n are not compatible.  The fix is to write a message and
+turn off the -wc parameter when the both occur.  This was fixed 8 Sep 2020 in
+"do not allow -wc and -lp together, can cause bugs", 7103781.
+
+=item B<Internal fault detected by perltidy>
+
+This snippet after processing with the indicated parameters triggered a Fault
+message in store-token-to-go due to discontinuous internal index values :
+
+  perltidy --noadd-newlines --space-terminal-semicolon
+
+  if ( $_ =~ /PENCIL/ ) { $pencil_flag= 1 } ; ;
+  $yy=1;
+
+This triggered the message:
+
+ ==============================================================================
+ While operating on input stream with name: '<stdin>'
+ A fault was detected at line 7472 of sub 'Perl::Tidy::Formatter::store_token_to_go'
+ in file '/home/steve/bin/Perl/Tidy/Formatter.pm'
+ which was called from line 8298 of sub 'Perl::Tidy::Formatter::process_line_of_CODE'
+ Message: 'Unexpected break in K values: 591 != 589+1'
+ This is probably an error introduced by a recent programming change. 
+ ==============================================================================
+
+The deletion of the extra, spaced, comma had created an extra space in the token array which
+had not been forseen in the original programming. It was fixed 10 Sep 2020 in
+"fixed very rare fault found with automated testing", eb1b1d9.
+
+=item B<Error parsing deprecated $# variable>
+
+This problem can be illustrated with this two-line snippet:
+
+  $#
+  eq$,?print"yes\n":print"no\n";
+
+Perltidy joined '$#' and 'eq' to get $#eq, but should have stopped at the line end to
+get $# followed by keyword 'eq'.  (Note that $# is deprecated). This was fixed 11 Sep 2020 in
+"fixed several fringe parsing bugs found in testing", 85e01b7.
+
+=item B<Error message parsing a file with angle brackets and ternaries>
+
+This problem can be illustrated with the following test snippet which was not correctly parsed. 
+
+ print$$ <300?"$$<300\n":$$<700?"$$<700\n":$$<2_000?"$$<2,000\n":$$<10_000?"$$ <10,000\n":"$$>9,999\n";
+
+The problem is related to the '<' symbol following the '$$' variable, a possible filehandle,
+and is similar to a previous bug. The problem was corrected 11 Sep 2020 in
+"fixed several fringe parsing bugs found in testing", 85e01b7.  The line now correctly
+formats to
+
+ print $$ < 300  ? "$$<300\n"
+   : $$ < 700    ? "$$<700\n"
+   : $$ < 2_000  ? "$$<2,000\n"
+   : $$ < 10_000 ? "$$ <10,000\n"
+   :               "$$>9,999\n";
+
+
+=item B<code crash with cuddled-else formatting on unbalanced files>
+
+A file with incorrect bracing which effectively gave negative indentation
+caused a crash when a stack was referenced with a negative index. The problem
+was fixed 8 Sept 2020 in 
+"convert array to hash to avoid trouble with neg levels in bad files", a720e0d.
+
+=item B<error message 'Unterminated angle operator?'>
+
+This error can be demonstrated with this line.
+
+  print $i <10 ? "yes" : "no";
+
+Perl has some strange parsing rules near a possible filehandle, and they change
+over time. The '<' here is a less than symbol, but perltidy expected that it
+might be the start of an angle operator, based on the old rules, and gave a
+warning. The formatting was still correct, but the warning was confusing.  This
+has been fixed 8 Sep 2020 in 'remove confusing warning message', 0a4d725.
+
+
+=item B<Line broken after here target>
+
+This problem is illustrated with the following snippet
+
+  $sth= $dbh->prepare (<<"END_OF_SELECT") or die "Couldn't prepare SQL" ;
+      SELECT COUNT(duration),SUM(duration) 
+      FROM logins WHERE username='$user'
+  END_OF_SELECT
+
+When run with a short line length it got broken after the here target,
+causing an error.  This was due to a recent program change and fixed
+7 Sep 2020 in 'fixed bug where long line with here target got broken', 8f7e4cb.
+
+
+=item B<undefined variable named 'test2'>
+
+An uninitialized value was being referenced and triggered this message:
+
+ undefined test2, i_opening=5, max=18, caller=Perl::Tidy::Formatter ./perltidy-20200907.pl 13465
+ Use of uninitialized value $test2 in numeric eq (==) at ./perltidy-20200907.pl line 19692.
+
+Fixed 8 Sep 2020 in 'fixed rare problem with stored index values for -lp option', 4147c8c.
+
+=item B<Line order switched at start of quoted text>
+
+This problem arose in several scripts involving the parameter
+--line-up-parentheses pluse one or more of the vertical tightness flags.
+It can be illustrated with the following snippet:
+
+    perltidy --line-up-parentheses --paren-vertical-tightness=1
+
+    if (
+        ( $name, $chap ) =
+        $cur_fname =~ m!^Bible/
+         .*?/          # testament
+         .*?/          # range of books
+         (.*?)/        # book name
+         .*?           # optional range of verses
+         (\d+)$!x
+      )
+    {
+        $cur_name = "$name $chap";
+    }
+
+This gave 
+
+    if (( $name, $chap ) =
+         .*?/          # testament
+        $cur_fname =~ m!^Bible/
+         .*?/          # range of books
+         (.*?)/        # book name
+         .*?           # optional range of verses
+         (\d+)$!x
+      )
+    {
+        $cur_name = "$name $chap";
+    }
+
+Notice the incorrect line order.  The problem was an incorrect order of
+operations in the vertical aligner flush, leaving a line stranded and coming
+out in the wrong order.  This was fixed 11 Sep 2020.
+
+=item B<crash due to bad index named '$j_terminal_match'>
+
+This crash was due to an index error which caused a non-existant object to be
+referenced. The problem is fixed 2020-09-07 in "fix problem of undefined values involving j_terminal_match",
+c5bfa77.  The particular parameters which caused this were:
+
+    --noadd-newlines --nowant-left-space='=' 
+
+=item B<an issue with the -x flag>
+
+This is not a bug but did take some time to resolve.  The problem was reduced to the
+following script run with the -x flag (--look-for-hash-bang)
+
+ print(SCRIPT$headmaybe . <<EOB . <<'EOF' .$tailmaybe),$!;
+ #!$wd/perl
+ EOB
+ print "\$^X is $^X, \$0 is $0\n";
+ EOF
+
+The resulting file had a syntax error (here-doc target EOB changed).
+
+ print(SCRIPT$headmaybe . <<EOB . <<'EOF' .$tailmaybe),$!;
+ #!$wd/perl
+ EOB print "\$^X is $^X, \$0 is $0\n";
+ EOF
+
+The problem is that the -x flag tells perltidy not to start parsing until it sees a
+line starting with '#!', which happens to be in a here-doc in this case.
+
+A warning was added to the manual 7 Sept 2020 in "add warning about
+inappropriate -x flag", fe66743.
+
+=item B<error parsing sub signature>
+
+This problem was reduced to the following snippet:
+
+ substr
+ (
+  $#
+ )
+
+The deprecated variable '$#' was being parsed incorrectly, and this was due to an error
+in which the word 'substr' followed by a paren was taken as the start of a sub signature.
+The problem was fixed 8 Sep 2020 in 'fix problem parsing sub prototypes' 569e05f.
+The code 
+
+  $container_type =~ /^sub/;
+
+was corrected to be
+
+  $container_type =~ /^sub\b/;
+
+
+=item B<uninitialized value message, found 7 Sep 2020>
+
+Unitialized values were referenced.  An index was not being tested.
+Fixed 8 Sep 2020 in "fix undefined variable", 9729965.
+
+ Use of uninitialized value $Kon in array element at /home/steve/bin/Perl/Tidy/Formatter.pm line 4022.
+ Use of uninitialized value $Kon in array element at /home/steve/bin/Perl/Tidy/Formatter.pm line 4023.
+ Use of uninitialized value $Ko in subtraction (-) at /home/steve/bin/Perl/Tidy/Formatter.pm line 4023.
+
+=back