Skip to content

Commit

Permalink
comment out broken Feature checks that fail mypy
Browse files Browse the repository at this point in the history
We currently cannot make this work because inside dependency() we don't
know the current subproject. We would also like the optional but
extremely useful location node, but we don't have that either...

Convert the broken code to a FIXME for visibility.
  • Loading branch information
eli-schwartz committed Feb 15, 2022
1 parent c0b8e02 commit 39f6179
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mesonbuild/dependencies/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ..compilers import clib_langs
from ..mesonlib import LibType, MachineChoice, MesonException, HoldableObject
from ..mesonlib import version_compare_many
from ..interpreterbase import FeatureDeprecated
#from ..interpreterbase import FeatureDeprecated, FeatureNew

if T.TYPE_CHECKING:
from .._typing import ImmutableListProtocol
Expand Down Expand Up @@ -496,14 +496,21 @@ def process_method_kw(possible: T.Iterable[DependencyMethods], kwargs: T.Dict[st
raise DependencyException(f'method {method!r} is invalid')
method = DependencyMethods(method)

# Raise FeatureNew where appropriate
if method is DependencyMethods.CONFIG_TOOL:
# FIXME: needs to get a handle on the subproject
# FeatureNew.single_use('Configuration method "config-tool"', '0.44.0')
pass
# This sets per-tool config methods which are deprecated to to the new
# generic CONFIG_TOOL value.
if method in [DependencyMethods.SDLCONFIG, DependencyMethods.CUPSCONFIG,
DependencyMethods.PCAPCONFIG, DependencyMethods.LIBWMFCONFIG]:
FeatureDeprecated.single_use(f'Configuration method {method.value}', '0.44', 'Use "config-tool" instead.')
# FIXME: needs to get a handle on the subproject
#FeatureDeprecated.single_use(f'Configuration method {method.value}', '0.44', 'Use "config-tool" instead.')
method = DependencyMethods.CONFIG_TOOL
if method is DependencyMethods.QMAKE:
FeatureDeprecated.single_use('Configuration method "qmake"', '0.58', 'Use "config-tool" instead.')
# FIXME: needs to get a handle on the subproject
# FeatureDeprecated.single_use('Configuration method "qmake"', '0.58', 'Use "config-tool" instead.')
method = DependencyMethods.CONFIG_TOOL

# Set the detection method. If the method is set to auto, use any available method.
Expand Down

0 comments on commit 39f6179

Please sign in to comment.