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

Meson warning fixups #549

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eli-schwartz
Copy link

No description provided.

@eli-schwartz eli-schwartz force-pushed the meson-warning-fixups branch 2 times, most recently from cb5ffa1 to 9386b67 Compare May 2, 2022 22:39
@eli-schwartz
Copy link
Author

Setting the check: kwarg requires newer Meson. I if/elsed the code for now as I'm not sure what the project policy is. I guess bumping it would drop support for Ubuntu 18.04 which probably should not matter.

This function has never taken a number, only a boolean. Due to leaky
python implementation details, it cast literally anything to bool
regardless, including somewhat common accidental usage of numbers. This
now prints an unavoidable deprecation notice stating that it may be
removed at any time.

Fix this to use what was always intended -- .set(), as used a few lines
down for another number.

Signed-off-by: Eli Schwartz <[email protected]>
@eli-schwartz eli-schwartz force-pushed the meson-warning-fixups branch from 9386b67 to dad1f2f Compare May 2, 2022 22:47
@ceyusa
Copy link
Contributor

ceyusa commented May 3, 2022

libva already uses meson_version : '>= 0.53.0' : https://github.com/intel/libva/blob/master/meson.build#L11

Perhaps it would worth to bump to the same version or, at least to 0.47

Recent versions of Meson warn you that the default is to not check the
return code, which is a bad default and may eventually change. To
suppress this warning, an explicit `check: ` value must be set.

Considering the code in play here:
- check if git exists
- if so, always assume this is running from a git checkout
- embed either '()' or '(git describe version)'

it seems likely the intention is indeed to have it be `check: false`,
but there's some missing error checking here to ensure it.

Check the returncode. If git fails, it is surely because there is no git
repository and the build is being run from a tarball. In that case,
behave as though git wasn't found in the first place, and use the
fallback value.

Suppressing the warning means bumping the minimum version of Meson. This
can be safely done since both the previous and new minimums are quite
old, and libva already depends on a much newer version.

Signed-off-by: Eli Schwartz <[email protected]>
@eli-schwartz eli-schwartz force-pushed the meson-warning-fixups branch from dad1f2f to 46898db Compare May 3, 2022 11:18
@eli-schwartz
Copy link
Author

Good point, done.

@apprehensions
Copy link

(Sorry to bother) When will this be merged?

@eli-schwartz
Copy link
Author

I would be happy to receive clarification on that as well.

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.

3 participants