Skip to content

Conversation

@dcbaker
Copy link
Member

@dcbaker dcbaker commented Oct 6, 2025

This time, without regressions, hopefully.

The goal here remains the same, get more robust checking for all compiler classes with less code per class. I've folding up review from the previous attempt (which I don't think GitHub will let me reopen), as well as additional changes.

One of the things I discovered after reverting the last attempt is that transpiled languages aren't being tested at all, only the actual compiler is being tested, without the output from the transpiler. So in the Vala cases this means that C gets called with the C implementation's code, and then we call it good. This obviously isn't good, this is bad. For Vala this is a pretty straightforward fix. For Cython this is proving more difficult, especially for me who doesn't have a lot of experience with compiled Python modules.

This is marked as draft as there's still issues here to be solved, particularly around Cython. This also doesn't have the code that adds checking for Assembly.

@dcbaker dcbaker force-pushed the submit/refactor-sanity-checking-v2 branch 4 times, most recently from aeb38ad to 3c7ea15 Compare October 6, 2025 21:43
@dcbaker dcbaker force-pushed the submit/refactor-sanity-checking-v2 branch 5 times, most recently from 03fa95a to a3be692 Compare November 20, 2025 18:50
@dcbaker dcbaker force-pushed the submit/refactor-sanity-checking-v2 branch 6 times, most recently from 7396595 to 2327e5f Compare December 1, 2025 22:48
@dcbaker dcbaker added this to the 1.11 milestone Dec 2, 2025
@dcbaker dcbaker force-pushed the submit/refactor-sanity-checking-v2 branch 4 times, most recently from 1ded607 to 1db1c4c Compare December 2, 2025 22:05
@dcbaker dcbaker marked this pull request as ready for review December 3, 2025 16:43
@dcbaker dcbaker requested a review from jpakkane as a code owner December 3, 2025 16:43
@dcbaker dcbaker force-pushed the submit/refactor-sanity-checking-v2 branch 3 times, most recently from 6c9d207 to 9b7cbc8 Compare January 9, 2026 17:46
Vala really needs a known working C compiler, and once we fix its
sanity_check, it will fail without one, so ensure it's there.
The goal is to reduce code duplication, and allow each language to
implement as little as possible to get good checking. The main
motivation is that half of the checks are fragile, as they add the work
directory to the paths of the generated files they want to use. This
works when run inside mesonmain because we always have an absolute build
directory, but when put into run_project_tests.py it doesn't work
because that gives a relative build directory.

Additionally, this fixes the implementation of sanity checking for
transpiled languages like Vala and Cython, which previously didn't test
the output of their compilers at all, but re-ran the C compiler test for
itself.
Instead of doing this in the sanity checking code. Apart from being more
"correct", this allows us to remove the custom sanity_checking
implementation.
@dcbaker dcbaker force-pushed the submit/refactor-sanity-checking-v2 branch from 9b7cbc8 to 239a661 Compare January 28, 2026 17:32
@dcbaker
Copy link
Member Author

dcbaker commented Jan 28, 2026

I would like to make some progress on this, if anyone would be up to review it.

@dcbaker
Copy link
Member Author

dcbaker commented Feb 2, 2026

I'm planning to merge this tomorrow unless someone is going to review it.

@bonzini
Copy link
Collaborator

bonzini commented Feb 3, 2026

Sure; I looked at it and I can see how it's an improvement, but didn't "approve" it because it's quite a large commit and would have required a lot more time. If anything breaks we'll fix it.

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