Hi Konrad,

The GlobalShadowChecker has not been changed at all since the Sightly Java
implementation was donated to Apache Sling. Furthermore I believe the WARN
messages are helpful when you accidentally overwrite a bindings value with
a "local" script variable and things don't work as you expect.

If you believe that the logger for that class is too noisy you can
configure it and increase its level to "ERROR".

Cheers,
Radu



On Fri, 14 Aug 2015 at 14:39 Konrad Windszus <konra...@gmx.de> wrote:

> In our code I see a lot of warnings like this one:
> org.apache.sling.scripting.sightly.impl.compiler.util.GlobalShadowChecker
> Global variable 'component' is being overridden in template
> It seems that the Sightly compiler always emits that warning in case a
> global variable name has been newly defined in a Sightly script like this
> <sly data-sly-use.<someGlobalVariableName>=“<someClass>”>…</sly>
> While I do understand that this might lead to issues, I would rather make
> that GlobalShadowChecker functionality configurable.
> This is especially useful as previous versions of the Sightly compiler
> didn’t have that feature.
> WDYT?
> Konrad
>
>

Reply via email to