mvysny / karibu-dsl

Kotlin Vaadin extensions and DSL
http://www.vaadinonkotlin.eu
MIT License
126 stars 16 forks source link

Plugin version (1.5.10) is not the same as library version (1.5.0) #34

Closed Saxintosh closed 3 years ago

Saxintosh commented 3 years ago

It seems that karibu-dsl-v8 version 1.0.7 is compiled with kotlin.version: 1.5.10 but uses kotlin-stdlib-jdk8 version: 1.5.0

mvysny commented 3 years ago

Hi, that's not true; Kotlin compiler 1.5.10 has only been introduced in the commit 63217b1f9ccda5e4c39f16414b7eff7c2c2157ef which happened after 1.0.7 has been released.

Saxintosh commented 3 years ago

well... this is the karibu-dsl-v8 pom file and says:

kotlin-stdlib-jdk8
  <version>1.5.0</version>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do_not_remove: published-with-gradle-metadata -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.mvysny.karibudsl</groupId>
  <artifactId>karibu-dsl-v8</artifactId>
  <version>1.0.7</version>
  <name>karibu-dsl-v8</name>
  <description>Karibu-DSL, Kotlin extensions/DSL for Vaadin</description>
  <url>https://github.com/mvysny/karibu-dsl</url>
  <licenses>
    <license>
      <name>The MIT License (MIT)</name>
      <url>https://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>mavi</id>
      <name>Martin Vysny</name>
      <email>martin@vysny.me</email>
    </developer>
  </developers>
  <scm>
    <url>https://github.com/mvysny/karibu-dsl</url>
  </scm>
  <dependencies>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk8</artifactId>
      <version>1.5.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-server</artifactId>
      <version>8.13.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.intellij</groupId>
      <artifactId>annotations</artifactId>
      <version>12.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>2.0.1.Final</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.30</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-push</artifactId>
      <version>8.13.0</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate.validator</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>6.2.0.Final</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>jakarta.validation-api</artifactId>
          <groupId>*</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.el</artifactId>
      <version>3.0.1-b11</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>
Saxintosh commented 3 years ago

oh! sorry!!!! 1.0.7 is still kotlin 1.5.0

My mistake!

mvysny commented 3 years ago

No problem :-) However, please let me know if Karibu-DSL 1.0.7 being compiled by Kotlin compiler 1.5.0 creates some kind of issue for you - if yes, I can release a new Karibu-DSL no problem :)

Just please let me know what exactly the problem is - I mean, the bytecode produced by the kotlin compiler should be quite compatible across compiler versions... :thinking:

Saxintosh commented 3 years ago

It would be great to have an updated version, thank you. What happens is that my master project inherits the 1.5.10 version of the stdlib from one of my subprojects. The conflict is only resolved if I explicitly import the stdlib 1.5.10 into the pom of my master project as well.

mvysny commented 3 years ago

Unfortunately, this kind of conflict is always going to be present - almost all Kotlin libraries do not track the release cycle of Kotlin itself, thus pulling older Kotlin in. You can work around this by pulling in the newest Kotlin libraries into your project, which will cause Gradle to override Kotlin stdlib versions in all libraries. Alternatively, you can exclude the kotlin-stdlib dependency from the karibu-dsl library.

Saxintosh commented 3 years ago

Yep! Thanks ;-)