Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Java 21 to CI #1134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Java 21 to CI #1134

wants to merge 1 commit into from

Conversation

dsvensson
Copy link

@dsvensson dsvensson commented Jul 8, 2024

I was about to write a test case for handlebars 4.4.0 with Java 21, but apparently the project doesn't compile yet with 21. Running tests locally results in 13 test failures under Java 21. Opened PR to have CI reflect that state. All failures locally are i18n related and throw java.lang.UnsupportedOperationException so hopefully just that one module change to fix them all.

@dsvensson
Copy link
Author

dsvensson commented Jul 8, 2024

The test case I was going to add, which is not covered by the failing tests, was that when running under Java 21, @last is always true in some loops - iirc not all, so when using that to splice in , between list entries for example, that results in no , being inserted.

Something like this (stripped from content so maybe looks a bit barren):

        {{#each coll as | subcoll | }}
              {{#each subcoll as | entry |}}
                  {{entry.name}}: {{serialize entry.value}}
                  {{#unless @last}},{{/unless}}
              {{/each}}
        {{#unless @last}},{{/unless}}
        {{/each}}

@mimranfaruqi
Copy link

mimranfaruqi commented Sep 2, 2024

@dsvensson I have this issue as well. I use @last in a nested loop but it is always false. I am using it with #unless. When I use #unless 2 > 3 the condition is always true, although it has to be false IMO.

Have you found a workaround to this or have you stopped working with this for now?

@dsvensson
Copy link
Author

@mimranfaruqi Other than staying at Java 17, no.

@jknack Any idea how to get Java 21 support working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants