Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sammyj85 opened this issue Jun 5, 2024 · 0 comments

Comments

@sammyj85
Copy link
Contributor

sammyj85 commented Jun 5, 2024

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'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant