lingua-franca icon indicating copy to clipboard operation
lingua-franca copied to clipboard

Sync Maven dependencies with Gradle dependencies

Open cmnrd opened this issue 2 years ago • 3 comments

It appears that Maven uses a Kotlin version below 1.5 while in gradle we use Kotlin 1.6.20. This surfaced because #1218 made use of the lowercase function introduced in Kotlin 1.5. But in the corresponding CI run (https://github.com/lf-lang/lingua-franca/runs/7590796430?check_suite_focus=true) the Maven build fails. The kotlin versions should be synchronized between both build systems. While we are at it, we should also double check all other dependencies.

cmnrd avatar Jul 31 '22 11:07 cmnrd

We actually have a script for this, written by @housengw: https://github.com/lf-lang/lingua-franca/blob/c742392a3a0d7e9be680ac65ed8c138b411c90e9/bin/bump-versions

lhstrh avatar Jul 31 '22 16:07 lhstrh

I'm uncertain what is the action item here. Are versions out of sync in master and this needs to be fixed? Or do we just want to jump to a new version? If so, which one? Tagging @cmnrd and @jhaye.

lhstrh avatar Aug 26 '22 06:08 lhstrh

There are 3 action items:

  • Update the Maven configuration so that it uses the same Kotlin version as is specified in gradle.properties.
  • Double check that all other dependency versions are in sync
  • Double check that the script linked by @lhstrh above works as expected when setting a new Kotlin version

At the moment I don't see a reason to bump the Kotlin version altogether.

cmnrd avatar Sep 07 '22 08:09 cmnrd

After some investigation I found that the Maven configuration is actually correct and specifies the same kotlin version as the one used in gradle. However, it appears that instead the Ecipse plugin is used for building the Kotlin files and it ships a much older version of Eclipse (1.4.0). Hence, the misalignment between Kotlin versions.

I am not sure how to resolve this. One option would be to revert the Kotlin version in our gradle configuration to 1.4.0. But this means that we are stuck with this old version until we find another solution. Also it might mean that we have to downgrade other dependencies. The alternative would be to drop support for the Kotlin based targets (C++, Rust, TypeScript) altogether in Epoch and promote VS Code instead.

This is closely related to lf-lang/epoch#10 as the underlying issue is the same, but it actually extends it to all platforms. Also tagging @a-sr on this.

cmnrd avatar Sep 22 '22 23:09 cmnrd

I was aware that the Kotlin plugin ships an outdated version but I hoped it would not cause any severe problems. Since this is starting to cause more and more issues, I will try to create an Eclipse plugin that mirrors the up-to-date libraries for the Eclipse runtime (#1377). We use the same mechanism in Kieler to make dependencies only located at maven central available to plugins. If it works, it should resolve this issue and maybe even lf-lang/lingua-franca#1371.

a-sr avatar Sep 26 '22 07:09 a-sr

This is hugely appreciated, @a-sr. Thanks for undertaking this!

lhstrh avatar Sep 26 '22 16:09 lhstrh