From: | Kartik Ohri <kartikohri13(at)gmail(dot)com> |
---|---|
To: | Chapman Flack <chap(at)anastigmatix(dot)net> |
Cc: | pljava-dev(at)lists(dot)postgresql(dot)org |
Subject: | Re: the ScriptingMojo |
Date: | 2020-08-25 21:06:33 |
Message-ID: | CAASLQ4PkP017rtyUswKO_TCiNmnica-nrQHBgggFw-U_9MstUg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
Hi!
> - I don't think formatDefines and formatIncludes make good PGXSUtils
> methods. The syntax could vary across compilers (might it use /D or /I
> on a Windows compiler, for example?). So I think they make better
> AbstractPGXS methods that can be overridden in the configuration.
> There could be a built-in implementation in AbstractPGXS using -D and -I.
> Defines should be provided as a map (key to value) and the option string
> with = sign should be produced by formatting.
>
> Regarding this, it seems that it is not possible to invoke a method whose
implementation
is provided in the Java class before an object is created. (Same for
default methods in an
interface) So, compile itself cannot call a formatDefines if a default
implementation is given using
AbstractPGXS. However, formatDefines can be called separately and the value
be passed to compile.
So, it would need creating a define method which also decides the defines
for the interface and
formats them. Another way is to pass the formatDefines function as a
parameter to compile. But
this only works for Graal and not nashorn. I am not sure whether nashorn
doesn't support it or there is
some way to do it I do not know of.
Thanks.
Regards,
Kartik
From | Date | Subject | |
---|---|---|---|
Next Message | Chapman Flack | 2020-08-25 23:14:54 | Re: the ScriptingMojo |
Previous Message | Chapman Flack | 2020-08-23 17:27:59 | Re: the ScriptingMojo |