diff options
author | Eli Schwartz <eschwartz93@gmail.com> | 2024-04-25 16:19:40 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2024-04-25 16:22:26 -0400 |
commit | a2ac3bc453c22c89ed7343f16b2848f81b73cb85 (patch) | |
tree | 13288b5359bdb8c0f56d66139159f9d4ef4a7ecc | |
parent | 80b9b125f47ff2cffa9f603fb86e6e237a039881 (diff) | |
download | meson-a2ac3bc453c22c89ed7343f16b2848f81b73cb85.zip meson-a2ac3bc453c22c89ed7343f16b2848f81b73cb85.tar.gz meson-a2ac3bc453c22c89ed7343f16b2848f81b73cb85.tar.bz2 |
find_library: improve the docs and FeatureNew to fully describe the change
The docs didn't really explain what the issue was with using it. And
it's not actually a "crash" either way.
The FeatureNew mentions that "name" is new, but it is standard for
these warnings to tell you both the type of object you're operating on
and the name of the method that is an issue. This omitted the former,
and was very confusing.
-rw-r--r-- | docs/markdown/snippets/find_library_name.md | 4 | ||||
-rw-r--r-- | mesonbuild/interpreter/interpreterobjects.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/markdown/snippets/find_library_name.md b/docs/markdown/snippets/find_library_name.md index ffb18eb..2ee60b1 100644 --- a/docs/markdown/snippets/find_library_name.md +++ b/docs/markdown/snippets/find_library_name.md @@ -1,3 +1,5 @@ ## dependencies created by compiler.find_library implement the `name()` method -Which would previously result in Meson crashing. +Previously, for a [[dep]] that might be returned by either [[dependency]] or +[[compiler.find_library]], the method might or might not exist with no way +of telling. diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index 0360e44..8cd9a2b 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -664,7 +664,7 @@ class ExternalLibraryHolder(ObjectHolder[ExternalLibrary]): pdep = self.held_object.get_partial_dependency(**kwargs) return pdep - @FeatureNew('name', '1.5.0') + @FeatureNew('dependency.name', '1.5.0') @noPosargs @noKwargs def name_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> str: |