Re: PL/Java new build plugin

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: PL/Java new build plugin
Date: 2020-07-05 04:35:46
Message-ID: CAASLQ4PtGSS-OP9k_740EBdyT1bVmDi1PUndn1ZNWzyJDRQkMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

>
> The commit where I tweaked for the custom suffixes was bf59577, and
> the one for the PG10 numbering change was c434748. The commit comments
> and diffs give some insight into what was changed and why. (Have you
> played with 'blame' in git before?)
>
No, I do not know about git blame but I will take a look and learn about
that.

It looks as if you copied the expressions faithfully, except perhaps
> for the flags that are set for the first one. That probably doesn't
> explain any problem you're having (though it should be fixed anyway),
> as that first pattern isn't even in play unless you are building against
> a devel, alpha, beta, or rc version of PostgreSQL.
>
I had checked about the si flag and think it is probably the same function
as the DOTALL flag I set for that pattern.

Can you supply an example of what is going wrong?
>
After the replacement, the string when written to file displays some empty
boxes instead of the correct version. I'll share an example soon.

One last thing, not regex related:
>
> You can see the original build.xml code invokes pg_config multiple
> times, reading one configuration value each time, and the same is
> done by PGXS in Makefile.global [1].
>
> It does seem more efficient to invoke pg_config only once and parse
> its output for the various values, as you are doing here.
>
> What could be the reason existing code avoided doing that?
>
I saw this as well and though that the plugin in POM executed multiple
times with the specific argument to assign the entire output as the
property. I did not go with that approach because I thought it was simply
not possible for that plugin to read the output and process it to store
different parts in multiple properties. I believe it to be the case with
PGXS as well since both of them are generic and need to cater various use
cases.

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Chapman Flack 2020-07-05 06:27:35 Re: PL/Java new build plugin
Previous Message Chapman Flack 2020-07-05 00:58:36 Re: PL/Java new build plugin