Re: tydedef extraction - back to the future - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: tydedef extraction - back to the future
Date
Msg-id 7f7e0760-2c27-4e94-b3de-e8c141a94e98@eisentraut.org
Whole thread Raw
In response to tydedef extraction - back to the future  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 20.05.24 23:11, Andrew Dunstan wrote:
> Attached is an attempt to thread this needle. The core is a new perl 
> module that imports the current buildfarm client logic. The intention is 
> that once we have this, the buildfarm client will switch to using the 
> module (if found) rather than its own built-in logic. There is precedent 
> for this sort of arrangement (AdjustUpgrade.pm). Accompanying the new 
> module is a standalone perl script that uses the new module, and 
> replaces the current shell script (thus making it more portable).

It looks like this code could use a bit of work to modernize and clean 
up cruft, such as

+       my $sep = $using_msvc ? ';' : ':';

This can be done with File::Spec.

+               next if $bin =~ m!bin/(ipcclean|pltcl_)!;

Those are long gone.

+               next if $bin =~ m!/postmaster.exe$!;    # sometimes a 
copy not a link

Also gone.

+       elsif ($using_osx)
+       {
+               # On OS X, we need to examine the .o files

Update the name.

+               # exclude ecpg/test, which pgindent does too
+               my $obj_wanted = sub {
+                       /^.*\.o\z/s
+                         && !($File::Find::name =~ m!/ecpg/test/!s)
+                         && push(@testfiles, $File::Find::name);
+               };
+
+               File::Find::find($obj_wanted, $binloc);
+       }

Not clear why this is specific to that platform.

Also, some instructions should be provided.  It looks like this is meant 
to be run on the installation tree?  A README and/or a build target 
would be good.

The code distinguishes between srcdir and bindir, but it's not clear 
what the latter is.  It rather looks like the installation prefix.  Does 
this code support out of tree builds?  This should be cleared up.




pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: in parentesis is not usual on DOCs
Next
From: Peter Eisentraut
Date:
Subject: Re: Pgoutput not capturing the generated columns