-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Refactor the sanity checking code, again #15092
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
Open
dcbaker
wants to merge
3
commits into
mesonbuild:master
Choose a base branch
from
dcbaker:submit/refactor-sanity-checking-v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor the sanity checking code, again #15092
dcbaker
wants to merge
3
commits into
mesonbuild:master
from
dcbaker:submit/refactor-sanity-checking-v2
+393
−279
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aeb38ad to
3c7ea15
Compare
03fa95a to
a3be692
Compare
7396595 to
2327e5f
Compare
1ded607 to
1db1c4c
Compare
6c9d207 to
9b7cbc8
Compare
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.
9b7cbc8 to
239a661
Compare
Member
Author
|
I would like to make some progress on this, if anyone would be up to review it. |
Member
Author
|
I'm planning to merge this tomorrow unless someone is going to review it. |
Collaborator
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.