mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.55k stars 1.61k forks source link

Deprecation warnings are reversed #7080

Closed jtojnar closed 4 years ago

jtojnar commented 4 years ago

Describe the bug When I use python3 module with min_version where it was not deprecated yet, I get deprecation warning and a “feature too new” warning:

DEPRECATION: Project targeting '>= 0.47' but tried to use feature deprecated since '0.48.0': python3 module
Build targets in project: 0
WARNING: Project specifies a minimum meson_version '>= 0.47' but uses features which were added in newer versions:
 * 0.48.0: {'python3 module'}
WARNING: Deprecated features used:
 * 0.48.0: {'python3 module'}

When I bump the min_version to 0.48 both warnings disappear.

To Reproduce

project('almanah', 'c', meson_version: '>= 0.47')

python3 = import('python3')
python = python3.find_python().path()

Expected behavior

system parameters

dcbaker commented 4 years ago

There's two issues here: 1) don't show deprecation warnings if the feature is not deprecated in the minimum version 2) meson shows both a deprecated warning and a too new warning for the exact same thing

1) is a feature request 2) is a regression

@nirbheek, do you think that 2) is worth fixing before 0.54.2? If so I'll look into it tomorrow.

nirbheek commented 4 years ago

@dcbaker yeah, sounds like something we should fix. Incorrect warnings are bad; causes a culture of people ignoring warnings.

dcbaker commented 4 years ago

I changed my mind, these are both bugs, and they're both fixed in the MR that closes this issue.