html5ever icon indicating copy to clipboard operation
html5ever copied to clipboard

Move code generation into an integration test

Open djc opened this issue 3 years ago • 8 comments

Since the generated code only depends on files in the repository anyway, save the separate compilation for the build script and only generate code in a test. Make it fail if the generated code is different from the stored source code to make CI fail if the generated code is out of date.

If this is deemed useful, we can do a similar thing for the maps generated in markup5ever.

djc avatar Apr 25 '22 14:04 djc

Ping?

djc avatar Aug 05 '22 09:08 djc

:umbrella: The latest upstream changes (presumably #481) made this pull request unmergeable. Please resolve the merge conflicts.

bors-servo avatar Oct 01 '22 12:10 bors-servo

Another ping... @nox did you want to take a look?

djc avatar Oct 03 '22 08:10 djc

:umbrella: The latest upstream changes (presumably #491) made this pull request unmergeable. Please resolve the merge conflicts.

bors-servo avatar Jan 11 '23 14:01 bors-servo

@jdm if I rebase this, will you review it?

djc avatar Jan 11 '23 14:01 djc

Rebased.

djc avatar Mar 27 '23 07:03 djc

@jdm since you seem to be paying attention -- got an opinion on this?

djc avatar Mar 20 '24 22:03 djc

One other reason I prefer this approach is that the generated code becomes much more legible (for example, via the IDE). I was trying to clean up extern crate usage and ended up creating issues in the generated code, which were pretty hard to inspect.

djc avatar Mar 21 '24 11:03 djc