[Mesa-dev] Mesa (master): glsl: do not use deprecated bison-keyword

Akim Demaille akim at lrde.epita.fr
Wed May 22 16:06:36 UTC 2019


Hi Erik,

> Le 22 mai 2019 à 08:54, Erik Faye-Lund <erik.faye-lund at collabora.com> a écrit :
> 
> I ended up reverting the change [from-%error-verbose to %define parse.error verbose] , and I can't find an obcious way to
> support both old and new versions with the same source file.

Well, you just disable warnings about deprecated features.
-Wno-deprecated.

> The Android SDK also ships a pre-3.x version of Bison, so you're not
> the only one affected. Also, Chocolatey doesn't provide a new enough
> version of Bison for Windows either.

I would be interested in knowing why some distros lag.  Do you
happen to know why for some of them?

> The problem is that Bison doesn't seem to have any mechanism for doing
> statements like these conditionally.

We try to keep your sources nice and clean, and using %if or
things like this is anything but nice.  So far these old
directives are not a maintenance burden, so there is no plan
to drop support for them.  But still, at least for consistency,
I promote the newest forms.

> The only way around that that I
> can see is to pre-process the source files somehow. But especially with
> three different build systems, that's not really a venue I find
> particularly attractive. If someone can think of a neat solution, I
> would certainly love to hear about it :)

Don't do that!

> For now I guess we can just live with the warning. But whenever the
> Bison devs decide to remove support for %error-verbose, I fear that
> we'll either have to drop support for older versions or live with pre-
> processing.

This should not happen.  What should happen though, is that distros
stop shipping old versions.


[generating the parsers in the tarballs]
> I don't really think this would work for us in Mesa. We no longer
> generate the distribution using autotools since we switched to Meson,
> we just do git archive these days.

Well, I think that's a pity.  The distinction between end user tools
and maintainer tools is a useful one.  As exemplified by the issue
at hand.


More information about the mesa-dev mailing list