As written in PR #2856, this code isn't quite right.
An ArgumentNode object can evaluate as False (if it's arguments attribute is
an empty sequence).
If that happens, we then try to hand the location kwarg down to print(),
rather than removing it, which causes an invalid keyword argument exception.
This failure can be seen e.g. when generating for gnome-twitch (See [1])
[1] https://travis-ci.org/jon-turney/meson-corpus-test/jobs/343017109
Examples:
meson.build:2:0: ERROR: Dependency is both required and not-found
meson.build:4: WARNING: Keyword argument "link_with" defined multiple times.
These are already matched by the default compilation-error-regexp-alist in
emacs.
Also:
Don't start 'red' markup until after the \n before an error
Unabsorb full-stop at end of warning with location from mlog.warning()
Update warning_location test
configure a detection method, for those types of dependencies that have
more than one means of detection.
The default detection methods are unchanged if 'method' is not
specified, and all dependencies support the method 'auto', which is the
same as not specifying a method.
The dependencies which do support multiple detection methods
additionally support other values, depending on the dependency.