Re: BUG #15414: extension compilation fails when c++ files are named with .cc

From: Andres Freund <andres(at)anarazel(dot)de>
To: Jerry Sievert <jerry(at)legitimatesounding(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15414: extension compilation fails when c++ files are named with .cc
Date: 2018-10-01 21:07:26
Message-ID: 20181001210726.yq2qjbce5ebs66cr@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2018-10-01 13:50:19 -0700, Jerry Sievert wrote:
> > On Oct 1, 2018, at 1:25 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> >
>
> > I'm a bit worried that supporting extensions that PG itself doesn't use
>
> Pg chose the extension .cpp, and chose it fairly recently. It seems to have been an arbitrary choice for the three files added as part of the JIT addition.

Well, we had to make a choice, no?

> > I guess we have two choices:
> > 1) Add rules for ".cpp", ".cc", ".C", ".cxx", and ".c++" and whatever
> > else we can think of. Add additional variants whenever somebody
> > presents one (and backpatch it).
>
> This is a rather disingenuous choice. Perhaps a better approach would
> be to do a quick survey of the existing c++ extensions (there aren’t
> very many), and make a determination of what the community has chosen
> to support.

I'm not following? Are you blaming me for suggesting to few, or too many
file extensions? What does make the above list disingenuous?

> As an aside, .C will be problematic on filesystems that are
> case-insensitive.

I don't think the existance of a %.bc: %.C rule would cause problems,
even on a case-insensitive system? Obviously it'd be problematic if
there's such files in the external project, and that project wants to
support a case-insensitive FS, but that's not really our problem as the
goal is to support outside conventions, no?

> > 2) Insist that pg extensions follow PGXS rules, which atm are to use
> > .cpp for c++ source files.
> >
> > I don't really have an opinion here.
>
> You have an obvious opinion here, and had a very strong opinion on irc.

Uh, I really don't. Perhaps you should start with the assumptions that
other people aren't dealing with you in bad faith? I told you which
rule to add, helped debugging it including looking at the source code of
the extension, then suggested you report a bug so we can discuss a
potential upstream resolution with more people? The only thing I pushed
back on was that we "arbitrarily" broke stuff.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-10-01 21:16:06 Re: BUG #15414: extension compilation fails when c++ files are named with .cc
Previous Message Jerry Sievert 2018-10-01 20:50:19 Re: BUG #15414: extension compilation fails when c++ files are named with .cc