You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <Fe...@day.com> on 2007/12/10 10:49:05 UTC

Re: svn commit: r602834 - in /incubator/sling/trunk/scripting/javascript/src: main/java/org/apache/sling/scripting/javascript/EspReader.java test/java/org/apache/sling/scripting/javascript/EspReaderTest.java

Hi

Am Montag, den 10.12.2007, 09:36 +0000 schrieb bdelacretaz@apache.org:
> Author: bdelacretaz
> Date: Mon Dec 10 01:36:42 2007
> New Revision: 602834
> 
> URL: http://svn.apache.org/viewvc?rev=602834&view=rev
> Log:
> SLING-114 - output an newline after each out.write(...); to make it easier to post-process generated javascript code

While it definitely makes the generated JavaScript more human-readable
(though it really is transient), it introduces a line shift with the
effect that an error message of Rhino will not match the input ESP line
thus making error fixing almost impossible. This is all the more
important as the intermediate JavaScript code is transient and cannot be
looked at.

So I suggest to revert this change.

Thanks and Regards
Felix



Re: svn commit: r602834 - in /incubator/sling/trunk/scripting/javascript/src: main/java/org/apache/sling/scripting/javascript/EspReader.java test/java/org/apache/sling/scripting/javascript/EspReaderTest.java

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Dec 10, 2007 10:49 AM, Felix Meschberger <Fe...@day.com> wrote:

> Am Montag, den 10.12.2007, 09:36 +0000 schrieb bdelacretaz@apache.org:
> > ...SLING-114 - output an newline after each out.write(...); to make it easier to post-process generated javascript code
>
> While it definitely makes the generated JavaScript more human-readable
> (though it really is transient), it introduces a line shift with the
> effect that an error message of Rhino will not match the input ESP line
> thus making error fixing almost impossible. ...

Ouch..sorry about that, I wasn't aware of the line numbering issue.

I'll revert the change, and then make this "always output and
end-line" feature optional, and use it only for ECT templates where
the whole generated script is visible in the browser, so line number
shifts do not matter.

-Bertrand