rewriter: Fix that default_options would not set the correct id

Currently default_options uses "" for the kwarks id, however this
is incorect and it must be "/". Additionally, this error won't be
ignored in the future with "--skip" (this is why the tests were
passing and this wasn't detected earlier).
pull/5450/head
Daniel Mensinger 6 years ago committed by Jussi Pakkanen
parent 5465fc5e28
commit 94c6da33a7
  1. 4
      mesonbuild/rewriter.py
  2. 2
      test cases/rewrite/3 kwargs/delete.json

@ -447,7 +447,7 @@ class Rewriter:
# First, remove the old values
kwargs_cmd = {
'function': 'project',
'id': "",
'id': "/",
'operation': 'remove_regex',
'kwargs': {
'default_options': ['{}=.*'.format(x) for x in cmd['options'].keys()]
@ -502,7 +502,7 @@ class Rewriter:
if cmd['function'] == 'project':
if cmd['id'] != '/':
mlog.error('The ID for the function type project must be "/"', *self.on_error())
self.handle_error()
return self.handle_error()
node = self.interpreter.project_node
arg_node = node.args
elif cmd['function'] == 'target':

@ -2,7 +2,7 @@
{
"type": "kwargs",
"function": "project",
"id": "",
"id": "/",
"operation": "delete",
"kwargs": {
"version": null

Loading…
Cancel
Save