Skip to content

Conversation

@bgilbert
Copy link
Contributor

@bgilbert bgilbert commented Nov 21, 2025

We might encounter a Meson version check that always evaluates to true or to false:

project('t', 'c', meson_version: '>=0.60.0')
if meson.version().version_compare('>=0.55.0')
  v = 1
endif
if meson.version().version_compare('<0.60.0')
  v = 2
endif

Print warnings in such cases.

Only the innermost version dependency is available to us, so we don't catch cases like:

project('t', 'c', meson_version: '>=0.50')
if meson.version().version_compare('<0.60')
  v = 1
  if meson.version().version_compare('>=0.40')
    v = 2
  endif
endif

but such constructs aren't typical.

We might encounter a Meson version check that always evaluates to true
or to false:

    project('t', 'c', meson_version: '>=0.60.0')
    if meson.version().version_compare('>=0.55.0')
      v = 1
    endif
    if meson.version().version_compare('<0.60.0')
      v = 2
    endif

Print warnings in such cases.

Only the innermost version dependency is available to us, so we don't
catch cases like:

    project('t', 'c', meson_version: '>=0.50')
    if meson.version().version_compare('<0.60')
      v = 1
      if meson.version().version_compare('>=0.40')
        v = 2
      endif
    endif

but such constructs aren't typical.
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