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.

Nikita

Reply via email to