mesonbuild / meson

The Meson Build System

Home Page:http://mesonbuild.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation: dep.as_system() does not default to 'preserve' but to 'system'

sammyj85 opened this issue · comments

Describe the bug

https://mesonbuild.com/Reference-manual_returned_dep.html#depas_system

dep.as_system()

Returns a copy of the dependency object, which has changed the value of include_type to value. The value argument is optional and defaults to 'preserve'.

https://mesonbuild.com/Reference-manual_functions.html#dependency_include_type

If include_type is set to 'preserve', no additional conversion will be performed.

This makes no sense. Why would you call dep.as_system() and expect it to convert it to anything other than system type?

Fortunately this is wrong, and it actually defaults to system type.

return self.held_object.generate_system_dependency(args[0] or 'system')

Expected behavior

The documentation should be corrected:

dep.as_system()

...
The value argument is optional and defaults to 'system'.