Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102798 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71006 invoked from network); 13 Jul 2018 09:55:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2018 09:55:44 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Received: from [82.113.146.227] ([82.113.146.227:39056] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/72-39793-C17784B5 for ; Fri, 13 Jul 2018 05:55:40 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 6838410C03F; Fri, 13 Jul 2018 10:55:36 +0100 (BST) Date: Fri, 13 Jul 2018 10:55:36 +0100 (BST) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Nikita Popov cc: Dmitry Stogov , PHP internals list , Stanislav Malyshev , "Christoph M. Becker" In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] re2c version(s) From: derick@php.net (Derick Rethans) On Fri, 13 Jul 2018, Nikita Popov wrote: > On Fri, Jul 13, 2018 at 11:13 AM, Dmitry Stogov wrote: > > > 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. > > > > 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. the timelib files *must* be generated with 0.15.3: https://github.com/mongodb/mongo/blob/master/src/third_party/scripts/timelib_get_sources.sh#L10-L11 > 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. The timelib files will need to be continued to be bundled. There is no rule in the Makefile either (unlike zend_language parser(s)), so this should not cause issues with GIT. cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Like Xdebug? Consider a donation: https://xdebug.org/donate.php, or become my Patron: https://www.patreon.com/derickr twitter: @derickr and @xdebug