Обсуждение: meson files copyright

Поиск
Список
Период
Сортировка

meson files copyright

От
Andrew Dunstan
Дата:
I notice that none of the meson files contain copyright notices. Shall I
add them?


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




Re: meson files copyright

От
Tom Lane
Дата:
Andrew Dunstan <andrew@dunslane.net> writes:
> I notice that none of the meson files contain copyright notices. Shall I
> add them?

+1.  Their comment density is pretty awful too --- maybe I'm just
not used to meson, but they seem just about completely undocumented.
And there's certainly been no effort to transfer the accumulated wisdom
of the makefile comments (where it's still relevant, of course).

Don't see any simple fix for that, but copyright notices would
be a good idea, and so would file identifiers according to our
longstanding practice.

            regards, tom lane



Re: meson files copyright

От
Vik Fearing
Дата:
On 12/19/22 16:20, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> I notice that none of the meson files contain copyright notices. Shall I
>> add them?
> 
> +1.  Their comment density is pretty awful too --- maybe I'm just
> not used to meson, but they seem just about completely undocumented.
> And there's certainly been no effort to transfer the accumulated wisdom
> of the makefile comments (where it's still relevant, of course).
> 
> Don't see any simple fix for that, but copyright notices would
> be a good idea, and so would file identifiers according to our
> longstanding practice.

Perhaps a bit off-topic, but what is the point of the file identifiers?
-- 
Vik Fearing




Re: meson files copyright

От
Tom Lane
Дата:
Vik Fearing <vik@postgresfriends.org> writes:
> Perhaps a bit off-topic, but what is the point of the file identifiers?

IMO, it helps to tell things apart when you've got a bunch of editor
windows open on some mighty samey-looking meson.build files.

            regards, tom lane



Re: meson files copyright

От
Robert Haas
Дата:
On Mon, Dec 19, 2022 at 1:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Vik Fearing <vik@postgresfriends.org> writes:
> > Perhaps a bit off-topic, but what is the point of the file identifiers?
>
> IMO, it helps to tell things apart when you've got a bunch of editor
> windows open on some mighty samey-looking meson.build files.

On the other hand, maintaining those identification lines in all of
our files has a pretty high distributed cost. I never use them to
figure out what file I'm editing because my editor can tell me that.
But I do have to keep fixing those lines as I create new files. It's
not the most annoying thing ever, but I wouldn't mind a bit if I
didn't have to do it any more.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Re: meson files copyright

От
Peter Eisentraut
Дата:
On 19.12.22 19:33, Robert Haas wrote:
> On Mon, Dec 19, 2022 at 1:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Vik Fearing <vik@postgresfriends.org> writes:
>>> Perhaps a bit off-topic, but what is the point of the file identifiers?
>>
>> IMO, it helps to tell things apart when you've got a bunch of editor
>> windows open on some mighty samey-looking meson.build files.
> 
> On the other hand, maintaining those identification lines in all of
> our files has a pretty high distributed cost. I never use them to
> figure out what file I'm editing because my editor can tell me that.
> But I do have to keep fixing those lines as I create new files. It's
> not the most annoying thing ever, but I wouldn't mind a bit if I
> didn't have to do it any more.

I agree it's not very useful and a bit annoying.




Re: meson files copyright

От
Andrew Dunstan
Дата:
On 2022-12-19 Mo 15:09, Peter Eisentraut wrote:
> On 19.12.22 19:33, Robert Haas wrote:
>> On Mon, Dec 19, 2022 at 1:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Vik Fearing <vik@postgresfriends.org> writes:
>>>> Perhaps a bit off-topic, but what is the point of the file
>>>> identifiers?
>>>
>>> IMO, it helps to tell things apart when you've got a bunch of editor
>>> windows open on some mighty samey-looking meson.build files.
>>
>> On the other hand, maintaining those identification lines in all of
>> our files has a pretty high distributed cost. I never use them to
>> figure out what file I'm editing because my editor can tell me that.
>> But I do have to keep fixing those lines as I create new files. It's
>> not the most annoying thing ever, but I wouldn't mind a bit if I
>> didn't have to do it any more.
>
> I agree it's not very useful and a bit annoying.


Not sure I agree the cost is high, but yes it's not quite zero either. I
can see a bit more value when it's used with files we have a lot of like
meson.build.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




Re: meson files copyright

От
Noah Misch
Дата:
On Mon, Dec 19, 2022 at 09:09:25PM +0100, Peter Eisentraut wrote:
> On 19.12.22 19:33, Robert Haas wrote:
> >On Mon, Dec 19, 2022 at 1:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >>Vik Fearing <vik@postgresfriends.org> writes:
> >>>Perhaps a bit off-topic, but what is the point of the file identifiers?
> >>
> >>IMO, it helps to tell things apart when you've got a bunch of editor
> >>windows open on some mighty samey-looking meson.build files.
> >
> >On the other hand, maintaining those identification lines in all of
> >our files has a pretty high distributed cost. I never use them to
> >figure out what file I'm editing because my editor can tell me that.
> >But I do have to keep fixing those lines as I create new files. It's
> >not the most annoying thing ever, but I wouldn't mind a bit if I
> >didn't have to do it any more.
> 
> I agree it's not very useful and a bit annoying.

Agreed.  To me, it's just one more thing to get wrong.



Re: meson files copyright

От
Andrew Dunstan
Дата:
On 2022-12-20 Tu 00:26, Noah Misch wrote:
> On Mon, Dec 19, 2022 at 09:09:25PM +0100, Peter Eisentraut wrote:
>> On 19.12.22 19:33, Robert Haas wrote:
>>> On Mon, Dec 19, 2022 at 1:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> Vik Fearing <vik@postgresfriends.org> writes:
>>>>> Perhaps a bit off-topic, but what is the point of the file identifiers?
>>>> IMO, it helps to tell things apart when you've got a bunch of editor
>>>> windows open on some mighty samey-looking meson.build files.
>>> On the other hand, maintaining those identification lines in all of
>>> our files has a pretty high distributed cost. I never use them to
>>> figure out what file I'm editing because my editor can tell me that.
>>> But I do have to keep fixing those lines as I create new files. It's
>>> not the most annoying thing ever, but I wouldn't mind a bit if I
>>> didn't have to do it any more.
>> I agree it's not very useful and a bit annoying.
> Agreed.  To me, it's just one more thing to get wrong.


OK, I think there are enough objections that we can put that aside for
now, I will just go and add the copyright notices.


cheers


andew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




Re: meson files copyright

От
Andres Freund
Дата:
On 2022-12-19 13:33:46 -0500, Robert Haas wrote:
> On Mon, Dec 19, 2022 at 1:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Vik Fearing <vik@postgresfriends.org> writes:
> > > Perhaps a bit off-topic, but what is the point of the file identifiers?
> >
> > IMO, it helps to tell things apart when you've got a bunch of editor
> > windows open on some mighty samey-looking meson.build files.
> 
> On the other hand, maintaining those identification lines in all of
> our files has a pretty high distributed cost. I never use them to
> figure out what file I'm editing because my editor can tell me that.
> But I do have to keep fixing those lines as I create new files. It's
> not the most annoying thing ever, but I wouldn't mind a bit if I
> didn't have to do it any more.

+1



Re: meson files copyright

От
Andres Freund
Дата:
Hi,

On 2022-12-19 10:20:45 -0500, Tom Lane wrote:
> Their comment density is pretty awful too --- maybe I'm just
> not used to meson, but they seem just about completely undocumented.
> And there's certainly been no effort to transfer the accumulated wisdom
> of the makefile comments (where it's still relevant, of course).

I did try to retain comments that seemed useful. E.g.

toplevel meson.build:

    # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
    # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
    # library from a separate OpenLDAP installation).  The most reliable
    # way to check that is to check for a function introduced in 2.5.
...
    # We are after Embed's ldopts, but without the subset mentioned in
    # Config's ccdlflags and ldflags.  (Those are the choices of those who
    # built the Perl installation, which are not necessarily appropriate
    # for building PostgreSQL.)
...
    # Functions introduced in OpenSSL 1.1.0. We used to check for
    # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
    # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
    # doesn't have these OpenSSL 1.1.0 functions. So check for individual
    # functions.
...
# Check if the C compiler understands __builtin_$op_overflow(),
# and define HAVE__BUILTIN_OP_OVERFLOW if so.
#
# Check for the most complicated case, 64 bit multiplication, as a
# proxy for all of the operations.  To detect the case where the compiler
# knows the function but library support is missing, we must link not just
# compile, and store the results in global variables so the compiler doesn't
# optimize away the call.
...

src/backend/meson.build:
...
# As of 1/2010:
# The probes.o file is necessary for dtrace support on Solaris, and on recent
# versions of systemtap.  (Older systemtap releases just produce an empty
# file, but that's okay.)  However, macOS's dtrace doesn't use it and doesn't
# even recognize the -G option.  So, build probes.o except on macOS.
# This might need adjustment as other platforms add dtrace support.


I'm sure there are a lot of comments that could also have been useful
that I missed - but there's also a lot that just didn't seem
meaningful. E.g. stuff like

# The following targets are specified in make commands that appear in
# the make files in our subdirectories. Note that it's important we
# match the dependencies shown in the subdirectory makefiles!
# Also, in cases where a subdirectory makefile generates two files in
# what's really one step, such as bison producing both gram.h and gram.c,
# we must request making the one that is shown as the secondary (dependent)
# output, else the timestamp on it might be wrong.  By project convention,
# the .h file is the dependent one for bison output, so we need only request
# that; but in other cases, request both for safety.

which just doesn't apply to meson.

- Andres



Re: meson files copyright

От
Thomas Munro
Дата:
On Tue, Dec 20, 2022 at 6:27 PM Noah Misch <noah@leadboat.com> wrote:
> On Mon, Dec 19, 2022 at 09:09:25PM +0100, Peter Eisentraut wrote:
> > On 19.12.22 19:33, Robert Haas wrote:
> > >On Mon, Dec 19, 2022 at 1:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > >>Vik Fearing <vik@postgresfriends.org> writes:
> > >>>Perhaps a bit off-topic, but what is the point of the file identifiers?
> > >>
> > >>IMO, it helps to tell things apart when you've got a bunch of editor
> > >>windows open on some mighty samey-looking meson.build files.
> > >
> > >On the other hand, maintaining those identification lines in all of
> > >our files has a pretty high distributed cost. I never use them to
> > >figure out what file I'm editing because my editor can tell me that.
> > >But I do have to keep fixing those lines as I create new files. It's
> > >not the most annoying thing ever, but I wouldn't mind a bit if I
> > >didn't have to do it any more.
> >
> > I agree it's not very useful and a bit annoying.
>
> Agreed.  To me, it's just one more thing to get wrong.

+1

We're just cargo-culting the old CVS $Id$ tags.