Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Serialize maps/lists when reconstructing lazily in case element(s) are updated

Open
#987 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

Start by reproducing the issue with the provided template and inspect the set-tag reconstruction and lazy serialization paths. Done means the reconstructed list preserves the updated nested map, or creates a deferred node when that cannot be represented safely.

Written by the indexing model from the issue text.

Description

Eager Execution
{% set list = [] %}
{% set map = {} %}
{% do list.append(map) %}
{% if deferred %}
{% do list.append(1) %}
{% endif %}
{% do map.update({'a': 'A'}) %}
{{ list }}

This currently becomes:

{% set list = [{} ] %}{% if deferred %}
{% do list.append(1) %}
{% endif %}

{{ list }}

When it should be more like:

{% set list = [{'a': 'A'} ] %}{% if deferred %}
{% do list.append(1) %}
{% endif %}

{{ list }}

Or at least create a deferred node so that we know that something went wrong. The best way I can currently think of to solve this is to make the serialization which is part of the set-tag reconstruction lazy.
This would require a great deal of refactoring so I don't know if it is worth it to solve.

Dominant language
Java
Stars
785
Forks
184
Avg merge
6d 22h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HubSpot/jinjava

All issues in HubSpot/jinjava

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.