Re: Remove MSVC scripts from the tree
От | Andrew Dunstan |
---|---|
Тема | Re: Remove MSVC scripts from the tree |
Дата | |
Msg-id | 0af80388-6610-bcbf-7810-ebc217c6194f@dunslane.net обсуждение исходный текст |
Ответ на | Re: Remove MSVC scripts from the tree (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: Remove MSVC scripts from the tree
|
Список | pgsql-hackers |
On 2023-12-21 Th 18:20, Michael Paquier wrote: > On Thu, Dec 21, 2023 at 03:43:32PM -0500, Andrew Dunstan wrote: >> On 2023-12-21 Th 03:01, Michael Paquier wrote: >>> Andrew, was the original target of pgperlsyncheck committers and >>> hackers who played with the MSVC scripts but could not run sanity >>> checks on Windows (see [1])? >> >> yes. > Okay, thanks. Wouldn't it be better to remove it at the end? With > the main use case behind its introduction being gone, it is less > attractive to keep maintaining it. If some people have been using it > in their workflows, I'm OK to keep it but the rest of the tree can be > checked at runtime as well. > >> I'm actually a bit dubious about win32tzlist.pl. Win32::Registry is not >> present in a recent Strawberry Perl installation, and its latest version >> says it is obsolete, although it's still included in the cpan bundle >> libwin32. >> >> I wonder who has actually run the script any time recently? > Hmm... I've never run it with meson on Win32. Turns out I was wrong - Windows sometimes doesn't find files nicely. It is present in my Strawberry installation. > >> In any case, we can probably work around the syncheck issue by making the >> module a runtime requirement rather than a compile time requirement, by >> using "require" instead of "use". > Interesting. Another trick would be needed for HKEY_LOCAL_MACHINE, > like what the dummylib but local to win32tzlist.pl. Roughly among > these lines: > -use Win32::Registry; > +use Config; > + > +require Win32::Registry; > > my $tzfile = 'src/bin/initdb/findtimezone.c'; > > +if ($Config{osname} ne 'MSWin32' && $Config{osname} ne 'msys') > +{ > + use vars qw($HKEY_LOCAL_MACHINE); > +} I've done it a bit differently, but the same idea. I have tested that what I committed passes checks on Unix and works on Windows. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: