I've been nagging about this bug for years.
In version 20.2 instead of a fix I found it actually got worse.
To the point where I will go back to 19.4 because the output of lots of my scripts is rubbish in 20.2.
I would really like it if this bug gets fixed really soon.
Script and output can be found below the summary.
Summary of the bug (See also script and output below)
Both line (--) and block (/* */) comments in scripts cause extra empty lines to be output to screen (and of course to file if spooling).
This used to happen only when using "format wrapped" for "set serveroutput".
But now it happens whichever format I choose, though "format wrapped" produces even more extra empty lines
First appearance of the bug
There was a bug in the 4.* versions that made comments in scripts cause extra empty line output to screen
This happened only when using "format wrapped" on "set serveroutput on"
See:
Turloch O'Tierney reported it fixed here:
Saying: "Bug fixed in code in development - confusion between \r\n windows newlines and \n UNIX/Linux newlines. (Or more specially \n (no \r) in a piece of text on windows)."
And indeed the problem was gone in the 17.2 version.
Re-appearance of the bug
In 18.2 suddenly the problem was back.
Obviously, I don't know if it's the same bug, but it's the exact same behavior.
See:
So far no fix for this yet.
I see this behavior both on windows and on linux.
Now it got a lot worse
With the release of 20.2 the problem exists not only when using "format wrapped" but with *any* format of "set serveroutput".
This means that even my workaround of using "format truncated" (which I *don't* want to use) is not a workaround anymore.
Please fix this, because currently I have only three options:
1. stay on 19.4 (will not be an option for years)
2. Remove all comments from all my scripts (not a valid option)
3. Return to using sql*plus (not something that makes me happy)
Script test_sqlcl.sql
Output in SQL*PLUS 19.3 (as expected)
Output in SQLcl 19.4 (extra lines only when using format wrapped)
Output in SQLcl 20.2 (extra lines using any format)