> -----Original Message-----
> From: Nikita Popov [mailto:nikita....@gmail.com]
> Sent: Friday, July 13, 2018 12:26 PM
> To: Dmitry Stogov <dmi...@zend.com>
> Cc: PHP internals list <internals@lists.php.net>; Stanislav Malyshev
> <smalys...@gmail.com>; der...@derickrethans.nl; Christoph M. Becker
> <cmbecke...@gmx.de>
> Subject: Re: [PHP-DEV] re2c version(s)
> 
> On Fri, Jul 13, 2018 at 11:13 AM, Dmitry Stogov <dmi...@zend.com> wrote:
> 
> > Hi,
> >
> >
> > I think, many core developers saw unexpected changes in
> > "zend_labguages_scanner.c" or "var_unserializer.c" after rebuilds.
> >
> > This occurs, because we use different versions of re2c, and some of
> > them produce really different code.
> >
> > They also embed version number into the generate source. Currently
> > different files in PHP source tree generated by different re2c versions:
> >
> >
> > ext/json/json_scanner.c 0.16
> >
> > ext/date/lib/parse_date.c 0.15.3
> >
> > ext/date/lib/parse_iso_intervals.c 0.15.3
> >
> > ext/pdo/pdo_sql_parser.c 0.16
> >
> > ext/phar/phar_path_check.c 1.0.3
> >
> > sapi/phpdbg/phpdbg_lexer.c 0.16
> >
> > ext/standard/url_scanner_ex.c 0.16
> >
> > ext/standard/var_unserializer.c 1.0.1
> >
> > Zend/zend_ini_scanner.c 0.15
> >
> > Zend/zend_language_scanner.c 1.0.1
> >
> >
> > I propose, to change build scripts (in master and PHP-7.3) to require
> > at least re2c version 1.0.0 (it seems 1.0.0-1.0.3 produce the same
> > result) and suppress version output into the generated files.
> >
> >
> > I'm not sure about timelib files.
> >
> >
> > Thanks. Dmitry.
> >
> 
> I don't think normalizing the version really solves anything. These files 
> should be
> dropped from version control entirely instead. Generated files do not belong 
> in
> version control.
>
> re2c is widely available on Linux distros nowadays (probably specifically 
> because
> PHP uses it) and while there might have been historical ground to bundle these
> generated files, there no longer is one.

I agree that these files shouldn't be in version control, but I think 
normalizing the version does buy us something - it ensures (or at least tries 
to) that whomever does generate these files does so with a version that we 
believe is suitable for the job.  This is of course especially important for 
the RM's machine - but it's also important for whomever else might be building 
from a direct checkout and not a source package (I think the files we currently 
see in source control are indicative of that). 

So why not do both - remove these files from version control, but also update 
the re2c requirements in configure and makedist..?

And of course we still want to bundle these in our distros - just not track 
them in our source control.

Zeev

Reply via email to