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-19 22:03:58
Message-ID: 5F14C34E.4020704@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

On 07/19/20 04:42, Kartik Ohri wrote:
> With using the System Class Loader as a temporary fix, I have been able to
> get the build working. I have pushed the changes. How can I test with Graal
> or other engines ?

I have just made a pull request on amCap1712/plugin that uses the
two-parented class loader idea. It turns out the idea wasn't completely
broken, but there's only one choice for which parent goes first.

I learned a lot more about how the Java 9 module system changed how
ServiceLoader works. That turns out to be the issue, and not so much
that the application class loader was just being left out. (And it turns
out the application class loader isn't needed to find Nashorn anyway;
the platform class loader can find it.)

To test with Graal, you can (1) do a build with Java 15 and see that
it breaks because Nashorn is gone :), and then (2) merge the
chore/master/denashorn branch and edit the main (parent) pom.xml, and
change the nashorngone profile so the two graal jars are added as
dependencies of org.postgresql:pljava-pgxs instead of maven-antrun-plugin.

Something isn't quite right about the handling of -Dpljava.libjvmdefault;
the C compiler gives syntax errors if I use it (the build succeeds if
I don't). Running with -X shows this being passed to the compiler:

-DPLJAVA_LIBJVMDEFAULT=${pljava.qlibjvmdefault}

so maybe there's a simple problem like one last line in the POM that
got overlooked, or something.

Of course it's kind of guaranteed not to work right on Windows, for
reasons we already know, but it ought to work on Linux.

Regards,
-Chap

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2020-07-20 00:12:10 Re: PL/Java new build plugin
Previous Message Kartik Ohri 2020-07-19 08:42:43 Re: PL/Java new build plugin