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

GraalVM changes incompatible with Karate #2536

Closed
edwardsph opened this issue Mar 18, 2024 · 11 comments
Closed

GraalVM changes incompatible with Karate #2536

edwardsph opened this issue Mar 18, 2024 · 11 comments
Assignees
Milestone

Comments

@edwardsph
Copy link
Contributor

I am currently using Quarkus 3.8.2 and Karate 1.5.0.RC3. That version of Quarkus came with Graal 23.0.1 so to ensure I get the right version of Graal, I use:

        <dependency>
            <groupId>org.graalvm.js</groupId>
            <artifactId>js-scriptengine</artifactId>
            <version>23.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.graalvm.js</groupId>
            <artifactId>js</artifactId>
            <version>23.0.3</version>
            <scope>runtime</scope>
        </dependency>

Quarkus 3.8.3 comes with Graal 23.1.2 which appears to introduce significant changes - see https://www.graalvm.org/release-notes/JDK_21/#javascript-and-nodejs for details.

I don't fully understand the implications but is it possible for Karate to be made compatible with this version of Graal?

@ptrthomas
Copy link
Member

@edwardsph thanks for the heads up. here's the link to the maven lib that we depend on: https://github.com/oracle/graaljs/blob/master/CHANGELOG.md#version-2310 to quote:

what are the main blockers you see ? I will need some time to investigate.

@ptrthomas
Copy link
Member

saving screenshot for future reference
image

@edwardsph
Copy link
Contributor Author

Perhaps I was just getting the maven coordinates wrong but in my first few attempts I was just getting time outs when running tests. That is normally what I see when I have mismatched modules. I will try again tomorrow with the above for a guide. Thanks

@edwardsph
Copy link
Contributor Author

I have found a solution. The problem, as you pointed out above, is that the maven coordinates have changed with version 23.1.0. As such I had to exclude the graal dependencies from Karate and include the new ones directly.

        <dependency>
            <groupId>io.karatelabs</groupId>
            <artifactId>karate-core</artifactId>
            <version>1.5.0.RC3</version>
            <exclusions>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.graalvm.js</groupId>
                    <artifactId>js</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.graalvm.js</groupId>
                    <artifactId>js-scriptengine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.graalvm.js</groupId>
            <artifactId>js-scriptengine</artifactId>
            <version>23.1.2</version>
        </dependency>
        <dependency>
            <groupId>org.graalvm.polyglot</groupId>
            <artifactId>js</artifactId>
            <version>23.1.2</version>
            <type>pom</type>
            <scope>runtime</scope>
        </dependency>

Once the coordinates in Karate are updated, I think I will be able to drop the exclusion and future compatibility issues between Quarkus and Karate can be resolved as before.

@ptrthomas
Copy link
Member

thanks @edwardsph for the update. I'm seriously going to identify an alternative to graal, will keep you posted

I see that they have started 2 versions of even the maven JARs. one is js and the other is js-community I'm wondering if you are aware of what the difference is

@edwardsph
Copy link
Contributor Author

It appears to be about licensing issues. From https://github.com/oracle/graaljs?tab=readme-ov-file#maven-artifact:

Language and tool dependencies use the GraalVM Free Terms and Conditions (GFTC) license by default. To use community-licensed versions instead, add the -community suffix to each language and tool dependency

@ptrthomas
Copy link
Member

@edwardsph thanks.

@ptrthomas
Copy link
Member

@edwardsph just FYI https://twitter.com/ptrthomas/status/1775754727700996381

ptrthomas added a commit that referenced this issue Apr 5, 2024
@ptrthomas ptrthomas self-assigned this Apr 5, 2024
@ptrthomas ptrthomas added this to the 1.5.0 milestone Apr 5, 2024
@ptrthomas
Copy link
Member

@edwardsph I bumped the graap dep all the way to 24 to fix another issue: #2542

also this is the dependency I finally went with: 5eccc2a

@ptrthomas
Copy link
Member

ptrthomas commented Apr 11, 2024

technically #2542 is a duplicate of this, but will keep both open for visibility

@ptrthomas
Copy link
Member

1.5.0 released

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

No branches or pull requests

2 participants