You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Nick Gearls <ni...@gmail.com> on 2016/10/05 12:48:06 UTC

Re: Unexpected Warnings from Macro Use in 2.4

Nobody is interested in avoiding problems with this sanity check?
Trivial to review, only a warning - but that could save hours to users


On 06-07-2016 09:25, Nick Gearls wrote:
> There's a patch (see 
> https://bz.apache.org/bugzilla/show_bug.cgi?id=58304) adding a warning 
> in case of syntax clash with 'Define'
>
> On 2/18/2015 6:12 AM, Tom Browder wrote:
> > I have been using mod_macro for some time and always get the following
> > types of messages on startup (using 2.4.12 now, but this behavior has
> > been noticed since 2.4.7):
> >
> > [Wed Feb 18 13:54:55.019032 2015] [core:warn] [pid 970:tid
> > 140069833443200] AH00111: Config variable ${PROJECT} is not defined
> > [Wed Feb 18 13:54:55.019041 2015] [core:warn] [pid 970:tid
> > 140069833443200] AH00111: Config variable ${TLD} is not defined
> >
> > For the example httpd instance only one macro is defined, used, and
> > undefined like this:
> >
> > <Macro VHOST_NONTLS ${PROJECT} ${TLD}>
> > <VirtualHost *:80>
> > ServerName ${PROJECT}.${TLD}
> > ServerAlias www.${PROJECT}.${TLD}
> > DocumentRoot /home/web-sites/${PROJECT}.${TLD}/public
> > </VirtualHost>
> > </Macro>
> > Use VHOST_NONTLS mysite org
> > UndefMacro VHOST_NONTLS
> >
> > The warnings I believe are spurious and should not be there. The
> > virtual hosts work fine after startup. Apparently, the first time
> > though the macro definitions are read and, since they are not defined,
> > the warnings are produced. It seems to me that is a bug.
> >
> > Am I doing something wrong?


Re: Unexpected Warnings from Macro Use in 2.4

Posted by Nick Gearls <ni...@gmail.com>.
All syntax checks are done inside mod_macro.
I agree that changing the syntax would be cleaner, but that would 
probably take some time.
Until that, a warning is better than nothing, no? We could also raise 
the warning to an error but I suppose some peopel may complain about 
backward compatibility...


On Thu, 6 Oct 2016 10:06:22, Eric Covener <co...@gmail.com> wrote
> On Thu, Oct 6, 2016 at 3:04 AM, Nick Gearls <ni...@gmail.com> wrote:
> >> I don't think mod_macro should emit a warning for its own basic
> >> configuration
> >
> > That's what it currently does (in 2.4)
>
> Isn't it the core currently and not mod_macro?   Which is why my
> preference is to advocate a syntax that isn't ambiguous/clashy (this
> might be more than a docs change, from my recollection of the last
> discussion about which of the supported syntaxes was least
> harmless/confusing)

Re: Unexpected Warnings from Macro Use in 2.4

Posted by Eric Covener <co...@gmail.com>.
On Thu, Oct 6, 2016 at 3:04 AM, Nick Gearls <ni...@gmail.com> wrote:
>> I don't think mod_macro should emit a warning for its own basic
>> configuration
>
> That's what it currently does (in 2.4)

Isn't it the core currently and not mod_macro?   Which is why my
preference is to advocate a syntax that isn't ambiguous/clashy (this
might be more than a docs change, from my recollection of the last
discussion about which of the supported syntaxes was least
harmless/confusing)

-- 
Eric Covener
covener@gmail.com

Re: Unexpected Warnings from Macro Use in 2.4

Posted by Nick Gearls <ni...@gmail.com>.
> I don't think mod_macro should emit a warning for its own basic configuration
That's what it currently does (in 2.4)

> it happens to overlap with the cores variable expansion
That's indeed a bad choice - this is why I propose a warning


-------- Forwarded Message --------
Subject: 	Re: Unexpected Warnings from Macro Use in 2.4
Date: 	Wed, 5 Oct 2016 09:57:31 -0400
From: 	Eric Covener <co...@gmail.com>
To: 	Apache HTTP Server Development List <de...@httpd.apache.org>, 
nickgearls@gmail.com



On Wed, Oct 5, 2016 at 8:48 AM, Nick Gearls <ni...@gmail.com> wrote:
> Nobody is interested in avoiding problems with this sanity check?
> Trivial to review, only a warning - but that could save hours to users
>
I didn't see it the first time, but I don't think mod_macro should
emit a warning for its own basic configuration because it happens to
overlap with the cores variable expansion. I don't like it for 2.4.


Re: Unexpected Warnings from Macro Use in 2.4

Posted by Eric Covener <co...@gmail.com>.
On Wed, Oct 5, 2016 at 8:48 AM, Nick Gearls <ni...@gmail.com> wrote:
> Nobody is interested in avoiding problems with this sanity check?
> Trivial to review, only a warning - but that could save hours to users
>
I didn't see it the first time, but I don't think mod_macro should
emit a warning for its own basic configuration because it happens to
overlap with the cores variable expansion. I don't like it for 2.4.