-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
templates: fix --executable, source discovery for more langs, test refactoring #15292
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
thesamesam
wants to merge
5
commits into
mesonbuild:master
Choose a base branch
from
thesamesam:sam-meson-init
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.
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
3ad05be to
30a8859
Compare
30a8859 to
86adbf9
Compare
86adbf9 to
d34d87a
Compare
dnicolodi
reviewed
Nov 24, 2025
dnicolodi
reviewed
Nov 24, 2025
dnicolodi
reviewed
Nov 24, 2025
dnicolodi
reviewed
Nov 24, 2025
dnicolodi
reviewed
Nov 24, 2025
dnicolodi
reviewed
Nov 24, 2025
d34d87a to
fa0d01c
Compare
Use `itertools.product()` to reduce an indentation level or two, though we lose one again by changing to a function for fresh vs dirty. I plan on adding more to these tests and it makes it a bit more manageable. Best-viewed-with: --ignore-all-space
* In 1.7.1, the behaviour of --executable was to just ignore it. * After my recent 9104bb6, the behaviour was that we'd require, for --executable xyz, xyz.c to exist or we'd fail to generate. Neither are good! Instead, create the sample source file w/ the project name, but call the executable whatever the user passed with `--executable`. Bug: mesonbuild#15286
I missed this in 9104bb6 as we were only testing whitelisted languages for source file discovery. Tests now handle all of these by using the map we have in compilers, as we need to know the suffix to use for the invalid source files we inject. Note that for tests, we mix explicit --lang in some cases and not others, which we could probably do better with. For these 'must fail' tests, I've stuck with explicit `--lang` to make sure we're testing what we want, but the others are perhaps up for debate. Bug: mesonbuild#15286
fa0d01c to
a9e38ed
Compare
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.
While adding some test coverage as a followup to some earlier changes, I found some other issues: