Closed Ihromant closed 1 year ago
Also because flavour is obviously deprecated, it would be great to remove documentation about it from teavm.org as it's a trap for newcomers like me.
I think Flavour should work with Java 17+ once the ASM support is upgraded, which looks like it happened in this commit: https://github.com/konsoletyper/teavm/commit/d097350787e6ff1c9434db0fa773adcefc4c1421
If you try out that commit (looks like you'll have to build it yourself until the dev release is posted), please let us know how it works. I haven't tried it yet.
FYI, I'm continuing to improve and upgrade Flavour, see Flavour Plus here: https://frequal.com/FlavourPlus/
I rebuilt jar to SNAPSHOT from source with bumped teavm version to the latest. It didn't help at all (or maybe I did something wrong). Will try with your jars, will notify about the results.
Just checked, same error.
OK, will check later today.
Also because flavour is obviously deprecated, it would be great to remove documentation about it from teavm.org as it's a trap for newcomers like me.
Flavour it not deprecated, it's suspended for an upredictable time. However, it's under Apache license, which means you can fork code and modify WRT you needs.
As for Java 17, Flavour uses ASM by itself, not the one provided by TeaVM, so you can get Flavour source code, update ASM version there and build it locally.
As for site issue, yes, I know, but removing mentions of Flavour requires to make decisions like how to restructure the whole site, and for this I have no time.
Sorry for the delay, I have been under the weather.
For me, the latest TeaVM, compiled with Java 17 is able to build the Flavour archetype app (from Docs/Getting Started) with 4 changes to the POM file, shown below. I will try a JSON deserialization test later to see if it has a problem
<java.version>1.8</java.version>
<teavm.version>0.6.1</teavm.version>
<version>3.1</version>
<version>2.4</version>
I tried the JSON ser / deser sample code from https://teavm.org/docs/flavour/json.html
It seems to compile fine using the above POM changes with a Java17-compiled TeaVM (from the latest sources).
Let us know if you're still getting errors with Java17. If it would help I could post my sample project.
After long investigation I resolved issue locally. Way to resolve it:
If you replace during build of flavour 0.7.0-SNAPSHOT to 0.7.0-dev-1207 - then at least on my machine I am able to reproduce error above on example project (same failure during mvn clean install -DskipTests). I don't know whether it's because 0.7.0-dev-1207 doesn't contain required fixes or if you are using Flavour with Java 17 - you need all bytecode to be built using 17, but fact is fact.
Funny update: teavm plugin in IDEA continues throwing same error (probably due to the fact that it was built under Java 8).
Issue was resolved for me with migration 0.7.0-dev-1207 -> 0.7.0-dev-1209 for both teavm and plugin. Don't know what fixed that, my updates for plugins or some internal changes, but it works. Many thanks anyway. @konsoletyper @ScraM-Team
I'm using flavour in m project for JSON serialization/deserialization. When I started using it, it wasn't deprecated. Now it prevents me from upgrading Java 11 -> 17. I tried to build it locally with removing all asm dependencies lower than 9.1, bumped teavm to newest version, nothing helps. When I'm building my project I receive error.
Manual serialization-deserialization is not an option as well, I have very big amount of DTOs and writing code for it manually is long and error-prone. This issue is related to https://github.com/konsoletyper/teavm/issues/622 where I tried to start writing own serializer prototype, but also didn't succeed.