convert some FeatureDeprecated for totally broken stuff, to FeatureBroken

We now warn everyone equally that totally ignored sources are bad and
should not be used.
pull/11879/head
Eli Schwartz 2 years ago
parent f93f443a53
commit 0ea28fa637
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 8
      mesonbuild/interpreter/interpreter.py

@ -3203,12 +3203,12 @@ class Interpreter(InterpreterBase, HoldableObject):
if 'sources' in kwargs:
sources += listify(kwargs['sources'])
if any(isinstance(s, build.BuildTarget) for s in sources):
FeatureDeprecated.single_use('passing references to built targets as a source file', '1.1.0', self.subproject,
'consider using `link_with` or `link_whole` if you meant to link, or dropping them as otherwise they are ignored',
FeatureBroken.single_use('passing references to built targets as a source file', '1.1.0', self.subproject,
'Consider using `link_with` or `link_whole` if you meant to link, or dropping them as otherwise they are ignored.',
node)
if any(isinstance(s, build.ExtractedObjects) for s in sources):
FeatureDeprecated.single_use('passing object files as sources', '1.1.0', self.subproject,
'pass these to the `objects` keyword instead, they are ignored when passed as sources',
FeatureBroken.single_use('passing object files as sources', '1.1.0', self.subproject,
'Pass these to the `objects` keyword instead, they are ignored when passed as sources.',
node)
# Go ahead and drop these here, since they're only allowed through for
# backwards compatibility anyway

Loading…
Cancel
Save