Re: PL/Java new build plugin

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Kartik Ohri <kartikohri13(at)gmail(dot)com>
Cc: pljava-dev(at)lists(dot)postgresql(dot)org
Subject: Re: PL/Java new build plugin
Date: 2020-07-21 21:33:52
Message-ID: 5F175F40.1000905@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

On 07/21/20 17:00, Kartik Ohri wrote:
>> I had set JAVA_HOME and ran javac -version which pointed that Java 15 was
> being used but I tested again to be sure.I specified the Java Home in the
> mvn statement and ran with debug flags to see which version was running.
> You can see around line 473 here
> https://travis-ci.com/github/amCap1712/pljava/jobs/363479322. The result is
> the same: the script engine finds nashorn but not graal.

How odd. When I run the tip of test-graal here with 15-ea, I simply get
"No suitable engine found for specified engine name or mime type".

If I go to the parent-project POM and edit the nashorngone profile
so that the two graal jars are added as dependencies of pljava-pgxs,
then I run it again, it finds graal. The dependency-collector debug
output now shows the dependencies:

[DEBUG] org.postgresql:pljava-pgxs:jar:0.0.1-SNAPSHOT:
[DEBUG] org.graalvm.js:js:jar:20.1.0:runtime
[DEBUG] org.graalvm.regex:regex:jar:20.1.0:runtime
[DEBUG] org.graalvm.truffle:truffle-api:jar:20.1.0:runtime
[DEBUG] org.graalvm.sdk:graal-sdk:jar:20.1.0:runtime
[DEBUG] org.ow2.asm:asm:jar:7.1:runtime
[DEBUG] org.ow2.asm:asm-tree:jar:7.1:runtime
[DEBUG] org.ow2.asm:asm-analysis:jar:7.1:runtime
[DEBUG] org.ow2.asm:asm-commons:jar:7.1:runtime
[DEBUG] org.ow2.asm:asm-util:jar:7.1:runtime
[DEBUG] com.ibm.icu:icu4j:jar:66.1:runtime
[DEBUG] org.graalvm.js:js-scriptengine:jar:20.1.0:runtime
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.1:runtime
[DEBUG] Created new class realm plugin>org.postgresql:pljava-pgxs:0.0.1-SNAPSHOT
[DEBUG] Importing foreign packages into class realm plugin>org.postgresql:pljava
-pgxs:0.0.1-SNAPSHOT
[DEBUG] Imported: < project>org.postgresql:pljava-so:1.6.0-SNAPSHOT
[DEBUG] Populating class realm plugin>org.postgresql:pljava-pgxs:0.0.1-SNAPSHOT
[DEBUG] Included: org.postgresql:pljava-pgxs:jar:0.0.1-SNAPSHOT
[DEBUG] Included: org.graalvm.js:js:jar:20.1.0
[DEBUG] Included: org.graalvm.regex:regex:jar:20.1.0
[DEBUG] Included: org.graalvm.truffle:truffle-api:jar:20.1.0
[DEBUG] Included: org.graalvm.sdk:graal-sdk:jar:20.1.0
[DEBUG] Included: org.ow2.asm:asm:jar:7.1
[DEBUG] Included: org.ow2.asm:asm-tree:jar:7.1
[DEBUG] Included: org.ow2.asm:asm-analysis:jar:7.1
[DEBUG] Included: org.ow2.asm:asm-commons:jar:7.1
[DEBUG] Included: org.ow2.asm:asm-util:jar:7.1
[DEBUG] Included: com.ibm.icu:icu4j:jar:66.1
[DEBUG] Included: org.graalvm.js:js-scriptengine:jar:20.1.0
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.1

and the logging you added:

[ERROR] Graal.js
[INFO] setProjectProperty("PGSQL_BINDIR",
...
[DEBUG] com(dot)oracle(dot)truffle(dot)js(dot)scriptengine(dot)GraalJSScriptEngine(at)66dfc523

So I think the dependency info explains why your run was not finding
graal. I remain baffled regarding how your run was managing to find
Nashorn instead. I wonder if you downloaded a more recent 15-ea than
I have, and there was a chorus of complaints and they put Nashorn back
in for now?

I would be interested to see what a similar Travis run will do after
making sure the graal dependencies are listed: will it then find nashorn,
or graal?

Regards,
-Chap

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2020-07-21 22:30:15 Re: PL/Java new build plugin
Previous Message Kartik Ohri 2020-07-21 21:00:34 Re: PL/Java new build plugin