meson icon indicating copy to clipboard operation
meson copied to clipboard

Unknown method "name" in object <[ExternalLibraryHolder] holds [ExternalLibrary]: <ExternalL ibrary m: True>> of type ExternalLibraryHolder

Open tagoh opened this issue 1 year ago • 1 comments

Describe the bug The document says name() method is available for dependency object but the exception is raised for an object from cc.find_library().

To Reproduce

cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required: false)
message(m_dep.name())

Expected behavior something should be printed out without any exceptions.

system parameters

  • Is this a cross build or just a plain native build (for the same computer)?
    • Native
  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)
    • Fedora Rawhide
  • what Python version are you using e.g. 3.8.0
    • 3.12.2
  • what meson --version
    • 1.3.2
  • what ninja --version if it's a Ninja build
    • 1.11.1

tagoh avatar Apr 08 '24 05:04 tagoh

Yeah, the documentation isn't very good there, as we have a bunch of methods that are implemented for dependency() but not compiler.find_library(). Name looks pretty trivial to implement though

dcbaker avatar Apr 08 '24 17:04 dcbaker