formatting improvement for include_directories sandbox violation warning

Print the location the warning was encountered, and quote the string
that triggered it. This makes it easier to read what actually happened.
pull/9997/head
Eli Schwartz 3 years ago
parent f08aabfb77
commit 7a1e8eecaf
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 4
      mesonbuild/interpreter/interpreter.py

@ -2462,9 +2462,9 @@ external dependencies (including libraries) must go to "dependencies".''')
try:
self.validate_within_subproject(self.subdir, a)
except InterpreterException:
mlog.warning('include_directories sandbox violation!')
mlog.warning('include_directories sandbox violation!', location=self.current_node)
print(textwrap.dedent(f'''\
The project is trying to access the directory {a} which belongs to a different
The project is trying to access the directory {a!r} which belongs to a different
subproject. This is a problem as it hardcodes the relative paths of these two projects.
This makes it impossible to compile the project in any other directory layout and also
prevents the subproject from changing its own directory layout.

Loading…
Cancel
Save