public inbox for [email protected]  
help / color / mirror / Atom feed
From: Kartik Ohri <[email protected]>
To: Chapman Flack <[email protected]>
Cc: [email protected]
Subject: Re: PL/Java new build plugin
Date: Wed, 22 Jul 2020 08:43:36 +0530
Message-ID: <CAASLQ4Ouw1hCHVtSC5XG7Fb-GoO0YAf4_PwsQc=22CvEzhQo6g@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAASLQ4Mva7dAXiS_c9OLhV4VzNHF=XNKJosuS5gtZTB6b4TW1Q@mail.gmail.com>
	<[email protected]>
	<CAASLQ4OR8ZD4GRNHVGuTzJp_UP-PAcADxcz=uymiSFPpg8EEHQ@mail.gmail.com>
	<[email protected]>
	<CAASLQ4O=tYGASWB6F+PTiB2L3RbmHcVX8XAbKHyhwBDOodH1zg@mail.gmail.com>
	<CAASLQ4P=c42e342-1YTTCBxA=CKBH2m=DLJN+ZQb5EJW6MyofQ@mail.gmail.com>
	<CAASLQ4NU3BgfCnVxvAbu9vK9+gtPT87xX1uBj57b0y2J6nxi+Q@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAASLQ4PjzGVCj559r60Kw7i3uRUTzJraxBSDDsNtAt8v8_-oWQ@mail.gmail.com>
	<[email protected]>
	<CAASLQ4PeivyN6DkBPbgYTZmoqoOVdCDwinDFrREsXqZi2HQnWg@mail.gmail.com>
	<[email protected]>
	<CAASLQ4Off+PnB8FqKLokKjAkvKbW00=fjH_LxuYJOGp0_C1YAw@mail.gmail.com>
	<CAASLQ4PcU=P4ShuMJOEnQj6p7ZU0VcgJ9St6PMpXcNB_1jPQ+w@mail.gmail.com>
	<[email protected]>
	<CAASLQ4P_v7u5z76XWfPmVeBvQtNdraiN0MmsRRfq-eNh1O1aTA@mail.gmail.com>
	<[email protected]>

On Wed, Jul 22, 2020 at 3:03 AM Chapman Flack <[email protected]> wrote:

> 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,
>

I had missed it during the merge. I had overlooked that the jars were added
as a dependency of maven-antrun. So, I added this fix but the CI failed (
https://travis-ci.com/github/amCap1712/pljava/jobs/363573395 commit SHA
8aa3e5c07108d944b66f164ad0b70082148a45b1 ) which made me realise that when
the profile is activated the plugin does not exist. The error message also
shows this. Maven looks in local and online repositories. Adding
dependencies directly to plava-pgxs's pom works. I think we could replicate
the profile in pgxs to ensure graal is only added as a dependency if needed.

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.oracle.truffle.js.scriptengine.GraalJSScriptEngine@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 was using the latest JDK 15+32. I checked the release notes which mark
the nashorn removal as  delivered. But they go only upto 15+29 till there
is no mention of nashorn again. So, I did a build again and checked again.
This time with automated travis build instead of debug and it detects only
Graal (no nashorn).  Despite specifying JAVA_HOME with maven, it seems it
was using a different Java installation or I made an inadvertent error in
the JAVA_HOME due to which it used the wrong installation, :( but plausible.

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?
>
I did a build with JDK 14 with the dependencies to find this out.
Interestingly, it fails when both coexist.
https://travis-ci.com/github/amCap1712/pljava/jobs/363575841 commit
SHA b5950dedc7018470e5331f20d9300344a00f40ce I think we will need to add
the profile in that case then.

(The Java 15 build failing in this case is probably because of some error I
made while merging the denashorn branch since the builds on the branch
itself were passing.)

Regards,
Kartik


view thread (132+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: PL/Java new build plugin
  In-Reply-To: <CAASLQ4Ouw1hCHVtSC5XG7Fb-GoO0YAf4_PwsQc=22CvEzhQo6g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox