bkiers / Liqp

An ANTLR based 'Liquid Template' parser and rendering engine.
MIT License
165 stars 94 forks source link

New release ? #205

Closed thibaultmeyer closed 3 years ago

thibaultmeyer commented 3 years ago

Hello,

is there a chance to have a new release (0.8.0 ?) that would have the 50+ commits made since the last release?

msangel commented 3 years ago

Hi! Most of the reported bugs are more features(that the library should support thro..), but there are two issues regarding handling time types: https://github.com/bkiers/Liqp/issues/204 https://github.com/bkiers/Liqp/issues/171 that definitely needs to be fixed before release. I am already working on those.

bkiers commented 3 years ago

@msangel when releasing a new version, I always ping Manfred Moser who volunteered to handle the push to Maven (see: https://github.com/bkiers/Liqp/issues/157). If you're familiar with the whole Maven process, you could also ask Manfred to give you access.

Depending on what the new version is going to be (right now that is defined in the Pom as 0.7.10) then https://github.com/bkiers/Liqp/releases should then also be updated (I'm more than happy to do that, just ping me when the release is done).

kkms commented 3 years ago

@bkiers @msangel I would like know when 0.7.10 will be released.

msangel commented 3 years ago

@bkiers I can do release myself, just need your approval (since you are an owner of nl.big-o). I believe sonatype devs can see this thread, so just type here something.

bkiers commented 3 years ago

@bkiers I can do release myself, just need your approval (since you are an owner of nl.big-o). I believe sonatype devs can see this thread, so just type here something.

You have my approval @msangel ! 👍

jvanzyl commented 3 years ago

I will try and do a release but for some reason this test fails on my Mac with 11.4, using AdoptOpenJDK 11.0.12+7 in UTC-04:00. @bkiers or @msangel any thoughts as to why before I go hunting?

msangel commented 3 years ago

openjdk version "11.0.2" 2019-01-15 goes fine: https://www.travis-ci.com/github/bkiers/Liqp/jobs/531761548

though some tests may rely on i18n strings that may differ in your JDK version

jvanzyl commented 3 years ago

Yah, the new CI on GHA works fine as well for the Mac. I'm trying to figure out why it's not working here locally. I'll try openjdk here locally.

jvanzyl commented 3 years ago

Must be my machine because the exact same OSX and JDK works in CI and fails on my machine. I'll figure it out.

https://github.com/bkiers/Liqp/pull/217/checks?check_run_id=3344456448

msangel commented 3 years ago

Can you give some logs with failing ones?

jvanzyl commented 3 years ago

Here is what happens in IDEA (as well as with Maven on the CLI):


java.lang.AssertionError
    at org.junit.Assert.fail(Assert.java:87)
    at org.junit.Assert.assertTrue(Assert.java:42)
    at org.junit.Assert.assertTrue(Assert.java:53)
    at liqp.LValueTest.testIsTemporal(LValueTest.java:13)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:27)
    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)

java.lang.AssertionError: render('{{946702800 | date: '%l'}}') = 
Expected: is " 12"
     but: was " 0"
Expected : 12
Actual   : 0
<Click to see difference>

    at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
    at liqp.filters.DateTest.applyTest(DateTest.java:74)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:27)
    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)

Process finished with exit code 255
msangel commented 3 years ago

I found the bug, thanks

msangel commented 3 years ago

Here: https://github.com/msangel/strftime4j/blob/master/src/main/java/ua/co/k/strftime/formatters/DateTimeFormatterFactory.java#L33 instead of ChronoField.HOUR_OF_AMPM there should be ChronoField.CLOCK_HOUR_OF_AMPM

because(as ruby docs): %l - Hour of the day, 12-hour clock, blank-padded ( 1..12) while: java docs: HOUR_OF_AMPM("HourOfAmPm", HOURS, HALF_DAYS, ValueRange.of(0, 11)), CLOCK_HOUR_OF_AMPM("ClockHourOfAmPm", HOURS, HALF_DAYS, ValueRange.of(1, 12)),

msangel commented 3 years ago

will release the fix tomorrow

jvanzyl commented 3 years ago

Awesome, thanks @msangel

msangel commented 3 years ago

@jvanzyl dependent library got fixed and published to maven central, also updated dependency version here. (i glad maven central still accept my key for that repo as the keyserver I used to use is already dead)

jvanzyl commented 3 years ago

Ok, master is working in CI and here locally so I can make a release. What's in master doesn't match the versioning that has gone on previously. The version is still <1.0 so I don't think you have to mark it as alpha. I would suggest going back to something like 0.8.0-SNAPSHOT and we release 0.8.0.

msangel commented 3 years ago

Yes. Release 0.8.0 make sense.

jvanzyl commented 3 years ago

Ok, I'll cut a release today.

jvanzyl commented 3 years ago

The 0.8.0 release has been made. It's just syncing to Maven Central now.