freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasper Rosenberg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FREEMARKER-60) Document interaction between lazy import and #global
Date Tue, 04 Jul 2017 15:51:00 GMT

    [ https://issues.apache.org/jira/browse/FREEMARKER-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16073853#comment-16073853
] 

Jasper Rosenberg commented on FREEMARKER-60:
--------------------------------------------

Yes, definitely make sense, it just took me a minute to understand the interplay and thought
others might run into the same thing.  Thanks!

Also, another extension might be to allow an optional parameter on the #import directive to
indicate whether it should be lazy or not.



> Document interaction between lazy import and #global
> ----------------------------------------------------
>
>                 Key: FREEMARKER-60
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-60
>             Project: Apache Freemarker
>          Issue Type: Improvement
>          Components: documentation
>    Affects Versions: 2.3.26-incubating
>            Reporter: Jasper Rosenberg
>            Priority: Trivial
>
> If I am understanding what is going on correctly, it appears that when you turn on lazy
imports, #global variables defined in that file will not be defined unless something else
first accesses the imported file's namespace.  This is a bit of a weird case so it might just
be worth documenting.
> Alternatively, you could say that if you have #global variables defined in a file it
disqualifies it from being lazily imported.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message