Skip to content

Drop generated timelib lexer files#22170

Open
mvorisek wants to merge 1 commit into
php:masterfrom
mvorisek:timelib_gen_re2
Open

Drop generated timelib lexer files#22170
mvorisek wants to merge 1 commit into
php:masterfrom
mvorisek:timelib_gen_re2

Conversation

@mvorisek
Copy link
Copy Markdown
Contributor

@mvorisek mvorisek commented May 28, 2026

based on #21206 (comment)

The ext/date/lib/parse_date.c and ext/date/lib/parse_iso_intervals.c files are generated from their .re files.

The C files are newly generated like other lexer files for json, phar... This unifies the build process and simplifies upstream updates, patches...

@mvorisek mvorisek marked this pull request as ready for review May 28, 2026 16:46
@mvorisek mvorisek changed the title Buid timelib lexer files like other Drop generated timelib lexer files May 29, 2026
@iluuu1994
Copy link
Copy Markdown
Member

Can a RM (e.g. @edorian or @DanielEScherzer) confirm whether this needs changes in the release process? I think there are some manual steps involved for generating the language parser files. Maybe this would need to be added to some docs.

@DanielEScherzer
Copy link
Copy Markdown
Member

DanielEScherzer commented Jun 1, 2026

Can a RM (e.g. @edorian or @DanielEScherzer) confirm whether this needs changes in the release process? I think there are some manual steps involved for generating the language parser files. Maybe this would need to be added to some docs.

I think this would need a change, but not tested yet

But what if instead, we just kept the generated files in this repo, and updated the github tests that make sure generated files are up to date to include these files too?

@iluuu1994
Copy link
Copy Markdown
Member

The output of re2c is bound to change in the future, so I personally think it's better to do this as a build step, especially given re2c is already a dependency for builds from source (from GH at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants