Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move code generation into an integration test #472

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

djc
Copy link
Contributor

@djc djc commented Apr 25, 2022

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
Copy link
Contributor Author

djc commented Aug 5, 2022

Ping?

@bors-servo
Copy link
Contributor

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

@djc
Copy link
Contributor Author

djc commented Oct 3, 2022

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

@bors-servo
Copy link
Contributor

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

@djc
Copy link
Contributor Author

djc commented Jan 11, 2023

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

@djc djc force-pushed the test-codegen branch 2 times, most recently from 57d678d to c814231 Compare March 27, 2023 07:36
@djc
Copy link
Contributor Author

djc commented Mar 27, 2023

Rebased.

@djc
Copy link
Contributor Author

djc commented Mar 20, 2024

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

@djc djc force-pushed the test-codegen branch 3 times, most recently from 1f5203a to d10dc22 Compare March 21, 2024 10:07
@djc
Copy link
Contributor Author

djc commented Mar 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants