@@ -546,7 +546,7 @@ def check_stdlibs(self):
546
546
except KeyError :
547
547
continue
548
548
if len (di ) == 1 :
549
- FeatureNew .single_use ('stdlib without variable name' , '0.56.0' , self .subproject )
549
+ FeatureNew .single_use ('stdlib without variable name' , '0.56.0' , self .subproject , location = self . current_node )
550
550
kwargs = {'native' : for_machine is MachineChoice .BUILD ,
551
551
}
552
552
name = l + '_stdlib'
@@ -608,11 +608,11 @@ def extract_variables(self, kwargs, argname='variables', list_new=False, dict_ne
608
608
variables = kwargs .get (argname , {})
609
609
if isinstance (variables , dict ):
610
610
if dict_new and variables :
611
- FeatureNew .single_use (f'{ argname } as dictionary' , '0.56.0' , self .subproject )
611
+ FeatureNew .single_use (f'{ argname } as dictionary' , '0.56.0' , self .subproject , location = self . current_node )
612
612
else :
613
613
varlist = mesonlib .stringlistify (variables )
614
614
if list_new :
615
- FeatureNew .single_use (f'{ argname } as list of strings' , '0.56.0' , self .subproject )
615
+ FeatureNew .single_use (f'{ argname } as list of strings' , '0.56.0' , self .subproject , location = self . current_node )
616
616
variables = collections .OrderedDict ()
617
617
for v in varlist :
618
618
try :
@@ -668,7 +668,7 @@ def func_assert(self, node: mparser.FunctionNode, args: T.Tuple[bool, T.Optional
668
668
kwargs : 'TYPE_kwargs' ) -> None :
669
669
value , message = args
670
670
if message is None :
671
- FeatureNew .single_use ('assert function without message argument' , '0.53.0' , self .subproject )
671
+ FeatureNew .single_use ('assert function without message argument' , '0.53.0' , self .subproject , location = node )
672
672
673
673
if not value :
674
674
if message is None :
@@ -1018,7 +1018,7 @@ def func_get_option(self, nodes: mparser.BaseNode, args: T.Tuple[str],
1018
1018
def func_configuration_data (self , node : mparser .BaseNode , args : T .Optional [dict ], kwargs : 'TYPE_kwargs' ) -> ConfigurationDataObject :
1019
1019
initial_values = args [0 ]
1020
1020
if initial_values is not None :
1021
- FeatureNew .single_use ('configuration_data dictionary' , '0.49.0' , self .subproject )
1021
+ FeatureNew .single_use ('configuration_data dictionary' , '0.49.0' , self .subproject , location = node )
1022
1022
else :
1023
1023
initial_values = {}
1024
1024
return ConfigurationDataObject (self .subproject , initial_values )
@@ -1105,7 +1105,7 @@ def func_project(self, node: mparser.FunctionNode, args: T.Tuple[str, T.List[str
1105
1105
1106
1106
version = kwargs ['version' ]
1107
1107
if isinstance (version , mesonlib .File ):
1108
- FeatureNew .single_use ('version from file' , '0.57.0' , self .subproject )
1108
+ FeatureNew .single_use ('version from file' , '0.57.0' , self .subproject , location = node )
1109
1109
self .add_build_def_file (version )
1110
1110
ifname = version .absolute_path (self .environment .source_dir ,
1111
1111
self .environment .build_dir )
@@ -1202,7 +1202,7 @@ def func_add_languages(self, node: mparser.FunctionNode, args: T.Tuple[T.List[st
1202
1202
@noKwargs
1203
1203
def func_message (self , node , args , kwargs ):
1204
1204
if len (args ) > 1 :
1205
- FeatureNew .single_use ('message with more than one argument' , '0.54.0' , self .subproject )
1205
+ FeatureNew .single_use ('message with more than one argument' , '0.54.0' , self .subproject , location = node )
1206
1206
args_str = [stringifyUserArguments (i ) for i in args ]
1207
1207
self .message_impl (args_str )
1208
1208
@@ -1278,15 +1278,15 @@ def _print_summary(self) -> None:
1278
1278
@noKwargs
1279
1279
def func_warning (self , node , args , kwargs ):
1280
1280
if len (args ) > 1 :
1281
- FeatureNew .single_use ('warning with more than one argument' , '0.54.0' , self .subproject )
1281
+ FeatureNew .single_use ('warning with more than one argument' , '0.54.0' , self .subproject , location = node )
1282
1282
args_str = [stringifyUserArguments (i ) for i in args ]
1283
1283
mlog .warning (* args_str , location = node )
1284
1284
1285
1285
@noArgsFlattening
1286
1286
@noKwargs
1287
1287
def func_error (self , node , args , kwargs ):
1288
1288
if len (args ) > 1 :
1289
- FeatureNew .single_use ('error with more than one argument' , '0.58.0' , self .subproject )
1289
+ FeatureNew .single_use ('error with more than one argument' , '0.58.0' , self .subproject , location = node )
1290
1290
args_str = [stringifyUserArguments (i ) for i in args ]
1291
1291
raise InterpreterException ('Problem encountered: ' + ' ' .join (args_str ))
1292
1292
@@ -1323,7 +1323,7 @@ def add_languages_for(self, args: T.List[str], required: bool, for_machine: Mach
1323
1323
# compilers we don't add anything for cython here, and instead do it
1324
1324
# When the first cython target using a particular language is used.
1325
1325
if 'vala' in langs and 'c' not in langs :
1326
- FeatureNew .single_use ('Adding Vala language without C' , '0.59.0' , self .subproject )
1326
+ FeatureNew .single_use ('Adding Vala language without C' , '0.59.0' , self .subproject , location = self . current_node )
1327
1327
args .append ('c' )
1328
1328
1329
1329
success = True
@@ -1660,7 +1660,7 @@ def func_vcs_tag(self, node, args, kwargs):
1660
1660
if 'input' not in kwargs or 'output' not in kwargs :
1661
1661
raise InterpreterException ('Keyword arguments input and output must exist' )
1662
1662
if 'fallback' not in kwargs :
1663
- FeatureNew .single_use ('Optional fallback in vcs_tag' , '0.41.0' , self .subproject )
1663
+ FeatureNew .single_use ('Optional fallback in vcs_tag' , '0.41.0' , self .subproject , location = node )
1664
1664
fallback = kwargs .pop ('fallback' , self .project_version )
1665
1665
if not isinstance (fallback , str ):
1666
1666
raise InterpreterException ('Keyword argument fallback must be a string.' )
@@ -1726,7 +1726,7 @@ def func_subdir_done(self, node, args, kwargs):
1726
1726
def func_custom_target (self , node : mparser .FunctionNode , args : T .Tuple [str ],
1727
1727
kwargs : 'kwargs.CustomTarget' ) -> build .CustomTarget :
1728
1728
if kwargs ['depfile' ] and ('@BASENAME@' in kwargs ['depfile' ] or '@PLAINNAME@' in kwargs ['depfile' ]):
1729
- FeatureNew .single_use ('substitutions in custom_target depfile' , '0.47.0' , self .subproject )
1729
+ FeatureNew .single_use ('substitutions in custom_target depfile' , '0.47.0' , self .subproject , location = node )
1730
1730
1731
1731
# Don't mutate the kwargs
1732
1732
kwargs = kwargs .copy ()
@@ -1875,7 +1875,7 @@ def make_test(self, node: mparser.BaseNode,
1875
1875
env = self .unpack_env_kwarg (kwargs )
1876
1876
1877
1877
if kwargs ['timeout' ] <= 0 :
1878
- FeatureNew .single_use ('test() timeout <= 0' , '0.57.0' , self .subproject )
1878
+ FeatureNew .single_use ('test() timeout <= 0' , '0.57.0' , self .subproject , location = node )
1879
1879
1880
1880
prj = self .subproject if self .is_subproject () else self .build .project_name
1881
1881
@@ -2227,7 +2227,7 @@ def func_configure_file(self, node, args, kwargs):
2227
2227
if 'configuration' in kwargs :
2228
2228
conf = kwargs ['configuration' ]
2229
2229
if isinstance (conf , dict ):
2230
- FeatureNew .single_use ('configure_file.configuration dictionary' , '0.49.0' , self .subproject )
2230
+ FeatureNew .single_use ('configure_file.configuration dictionary' , '0.49.0' , self .subproject , location = node )
2231
2231
conf = ConfigurationDataObject (self .subproject , conf )
2232
2232
elif not isinstance (conf , ConfigurationDataObject ):
2233
2233
raise InterpreterException ('Argument "configuration" is not of type configuration_data' )
@@ -2258,7 +2258,7 @@ def func_configure_file(self, node, args, kwargs):
2258
2258
conf .mark_used ()
2259
2259
elif 'command' in kwargs :
2260
2260
if len (inputs ) > 1 :
2261
- FeatureNew .single_use ('multiple inputs in configure_file()' , '0.52.0' , self .subproject )
2261
+ FeatureNew .single_use ('multiple inputs in configure_file()' , '0.52.0' , self .subproject , location = node )
2262
2262
# We use absolute paths for input and output here because the cwd
2263
2263
# that the command is run from is 'unspecified', so it could change.
2264
2264
# Currently it's builddir/subdir for in_builddir else srcdir/subdir.
@@ -2533,7 +2533,7 @@ def func_environment(self, node: mparser.FunctionNode, args: T.Tuple[T.Union[Non
2533
2533
kwargs : 'TYPE_kwargs' ) -> build .EnvironmentVariables :
2534
2534
init = args [0 ]
2535
2535
if init is not None :
2536
- FeatureNew .single_use ('environment positional arguments' , '0.52.0' , self .subproject )
2536
+ FeatureNew .single_use ('environment positional arguments' , '0.52.0' , self .subproject , location = node )
2537
2537
msg = ENV_KW .validator (init )
2538
2538
if msg :
2539
2539
raise InvalidArguments (f'"environment": { msg } ' )
0 commit comments