Re: [PHP-DEV] Re: Remove generated lexers from git?
Hi! Case in point: The current zend_language_scanner.c has been generated by Andrea, who uses a different re2c version from everybody else (0.13.6 instead of 0.13.5). This means that if I do some tiny change to zend_language_scanner.l I immediately get a 3000 line diff. So we just end up changing this file back and forth depending on the algorithm used by different versions. So, from time to time we'd get a big diff. But what's a big problem with that? It doesn't seem to hurt anything. And language scanner is not changed every day. I don't see any benefit in such change, just making building PHP harder. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Remove generated lexers from git?
Hi, Sorry to intrude, but why would building be harder? Tbh I don't see the point of keeping generated files in git. Why not keep release binaries too! (I'm kidding ofc.) Also, there may be a small number of big diffs, but one is enough to introduce a bug. Generating the file every time ensures there is no hidden bug. Just my 2 cents. Regards, Florian Margaine Le 2 oct. 2014 21:04, Stas Malyshev smalys...@sugarcrm.com a écrit : Hi! Case in point: The current zend_language_scanner.c has been generated by Andrea, who uses a different re2c version from everybody else (0.13.6 instead of 0.13.5). This means that if I do some tiny change to zend_language_scanner.l I immediately get a 3000 line diff. So we just end up changing this file back and forth depending on the algorithm used by different versions. So, from time to time we'd get a big diff. But what's a big problem with that? It doesn't seem to hurt anything. And language scanner is not changed every day. I don't see any benefit in such change, just making building PHP harder. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Remove generated lexers from git?
Hi! Sorry to intrude, but why would building be harder? Tbh I don't see the Because there are more dependencies and tools needed to build the parsers. You'd have to have recent re2c, for example. Which does not come by default with many systems. I see no reason to add this hurdle with no benefit for anybody. Also, there may be a small number of big diffs, but one is enough to introduce a bug. Generating the file every time ensures there is no hidden bug. Which bug? They are generated parsers from the same source, what kind of bug you're talking about? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Remove generated lexers from git?
Hi, On Thu, Oct 2, 2014 at 10:12 PM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! Sorry to intrude, but why would building be harder? Tbh I don't see the Because there are more dependencies and tools needed to build the parsers. You'd have to have recent re2c, for example. Which does not come by default with many systems. I see no reason to add this hurdle with no benefit for anybody. It's already necessary; PHP won't pass the configure step without re2c. Also, there may be a small number of big diffs, but one is enough to introduce a bug. Generating the file every time ensures there is no hidden bug. Which bug? They are generated parsers from the same source, what kind of bug you're talking about? Slipping in a malicious code in such a diff could easily go unnoticed, for instance. Or simply going to the file to see the generated code, leave a letter by mistake because the cat jumps on the keyboard, and there you go. I just mean that such big diffs are simply unreviewable; you have to trust that it was generated and not touched after. Why this unnecessary trust to give, when we can simply not have the file? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ -- Florian Margaine
[PHP-DEV] Re: Remove generated lexers from git?
Hello, sorry if I'm totally wrong - I have no experience in this area, but if someone is strongly against removing those files for any reason (not that I would) then we might consider passing -i flag while generating C files with re2c. As far as I can see most of the changes listed on every diff touching this file are different line numbers in comments. This option should disable them if only re2c documentation[1] is right. Regards, Maciej. [1]: http://re2c.org/manual.html I'd like to bring this up again. It seems the thread got side-tracked with unrelated discussion (about vm_execute.h) and I didn't get any answers to the original question. Case in point: The current zend_language_scanner.c has been generated by Andrea, who uses a different re2c version from everybody else (0.13.6 instead of 0.13.5). This means that if I do some tiny change to zend_language_scanner.l I immediately get a 3000 line diff. So we just end up changing this file back and forth depending on the algorithm used by different versions. Nikita -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Remove generated lexers from git?
On Tue, Aug 26, 2014 at 9:55 PM, Nikita Popov nikita@gmail.com wrote: Hi internals! Currently our git repo contains files like zend_language_scanner.c, zend_ini_scanner.c, etc which are files generated by re2c. Historically these files have been included because re2c was not readily available on many platforms. In the thread on bison 3 compatibility [1] there was some discussion as to whether this limitation still applies. Quoting Adam Harvey: +1. I don't think re2c is that onerous a requirement anyway, for the most part: it's available through apt-get, brew, yum, and probably most other packaging systems. Given the amount of other things a developer has to install to build php-src from git, re2c is hardly going to break the camel's back. So, I'd like to bring this up again. Are there any objections to removing generated lexer files from the repo? If not, does it suffice to just git rm them and add them to .gitignore, or are other changes required? Nikita [1]: http://markmail.org/message/x3p7ltekzws6ywhw I'd like to bring this up again. It seems the thread got side-tracked with unrelated discussion (about vm_execute.h) and I didn't get any answers to the original question. Case in point: The current zend_language_scanner.c has been generated by Andrea, who uses a different re2c version from everybody else (0.13.6 instead of 0.13.5). This means that if I do some tiny change to zend_language_scanner.l I immediately get a 3000 line diff. So we just end up changing this file back and forth depending on the algorithm used by different versions. Nikita