-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly fail by creating a deferred node when attempting to defer …
…modification of an alias outside of the context of an import. This is a niche situation that we'd rather explicitly fail on than have incorrect logic. Handling this correctly is complex and likely not worth it. Example: ``` {# 'eager/settings.jinja' #} {% set settings = {} %} {% macro load_settings() %} {% do settings.put('foo', 'bar') %} {% endmacro %} ``` ``` {# 'main.jinja' #} {% import 'eager/settings.jinja' as shared %} {% if deferred %} {{ shared.load_settings() }} {% endif %} {{ shared.settings }} ```
- Loading branch information
1 parent
fbdaf83
commit 9f74a8b
Showing
8 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/test/resources/eager/allows-modification-in-aliased-macro.jinja
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.