diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-07-19 13:22:20 -0700 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2023-07-20 14:20:46 -0400 |
commit | d7acccd36dcf1b62f144eb7389a5e221fe824be4 (patch) | |
tree | f3a3dd25423dd52e44c12f0df994f3bd22be96e9 /mesonbuild/interpreter | |
parent | a62a42b272923f95b7aeb30f0196cfdf3b251264 (diff) | |
download | meson-d7acccd36dcf1b62f144eb7389a5e221fe824be4.zip meson-d7acccd36dcf1b62f144eb7389a5e221fe824be4.tar.gz meson-d7acccd36dcf1b62f144eb7389a5e221fe824be4.tar.bz2 |
interpreter: deprecate 'jar' value of build_target(target_type)
Jar has a very low set of overlap with other target types, including
that jar sources *must* be .java, and no other target allows .java
sources. As such, the difficulty in crafting a useful `build_target`
invocation that allows both `jar` and anything else is high, and the
usefulness is dubious. Just use `jar()` directly instead.
This depends on the changes to make all of the jar() specific keyword
arguments be handled by typed_kwargs so that the deprecation messages
are correct and consistent.
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r-- | mesonbuild/interpreter/type_checking.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 7c615c2..206a2e6 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -555,7 +555,8 @@ LIBRARY_KWS = [ BUILD_TARGET_KWS = [ *LIBRARY_KWS, *_EXCLUSIVE_EXECUTABLE_KWS, - *_EXCLUSIVE_JAR_KWS, + *[a.evolve(deprecated='1.3.0', deprecated_message='The use of "jar" in "build_target()" is deprecated, and this argument is only used by jar()') + for a in _EXCLUSIVE_JAR_KWS], KwargInfo( 'target_type', str, @@ -566,6 +567,9 @@ BUILD_TARGET_KWS = [ }), since_values={ 'shared_module': '0.51.0', + }, + deprecated_values={ + 'jar': ('1.3.0', 'use the "jar()" function directly'), } ) ] |