More typed_kwargs for the gnome module#9594
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9594 +/- ##
==========================================
+ Coverage 67.06% 67.09% +0.02%
==========================================
Files 404 404
Lines 85733 85681 -52
Branches 18910 18898 -12
==========================================
- Hits 57501 57486 -15
+ Misses 23684 23661 -23
+ Partials 4548 4534 -14
Continue to review full report at Codecov.
|
|
The |
e51624f to
0e5f0b0
Compare
0e5f0b0 to
db26fff
Compare
234703b to
5054911
Compare
mesonbuild/modules/gnome.py
Outdated
| 'gnome.genmarshal', | ||
| DEPEND_FILES_KW, | ||
| INSTALL_KW.evolve(name='install_header'), | ||
| KwargInfo('build_always', bool, default=False), |
There was a problem hiding this comment.
There's a bunch of mysterious kwargs here, that are not in the documentation and are not in permittedKwargs. Attempting to use them raises a fatal error, e.g.
genmarshal/meson.build:1:0: ERROR: Got unknown keyword arguments "build_always"
In commit 80d665e, we added that error checking in, by following the documentation. At the time, the error message would be:
Meson encountered an error in file genmarshal/meson.build, line 1, column 0:
Invalid keyword argument build_always.
We also have some terrible manual argument checking in known_kwargs and known_custom_target_kwargs, but they've been entirely overridden for 4.5 years now, and no one has ever complained that they need these undocumented kwargs, which, again, were undocumented.
I see no particular grounds to re-add support for them half a decade later, especially just to mark at least one of them as deprecated in a later commit in the same PR... and if any of them do get added, that's fine, but they need to be added the same way kwargs usually get added, which means:
- distinct commit adding them (and preferably explaining why they are useful)
- I want them to be documented.
- new kwargs should never be added in an already-deprecated state, so we can just skip "build_always" entirely.
973e910 to
9b7cdb0
Compare
|
This pull request introduces 1 alert when merging 9b7cdb0 into bc8c938 - view on LGTM.com new alerts:
|
9b7cdb0 to
9d04f61
Compare
…ecking module These are going to be used in the gnome module.
There are thee arguments that are passed directly to CustomTarget which are not in the permittedKwargs: depends, depend_files, and build_always. The first two are obviously generically useful, as they allow creating correct ordering. The latter, not so much. Since it was an error to pass it, we'll just delete it.
There is a change here, in that packages has error messaging for using IncludeDirs objects in the packages argument, but it never worked, so the message was useless.
Using the deprected_message helper.
9d04f61 to
37a6fc0
Compare
This is a smaller follow up to the last set of cleanups to the gnome module with conversions to
typed_kwargs. There are only two functions covered here, genmarshal and generate_vapi. Again, this allows a number of nice cleanups. In addition I noticed that genmarshal still exposesbuild_alwayswithout deprecation. I've made that deprecated, and added thebuild_always_staleandbuild_by_defaultkeyword arguments matching the behavior ofcustom_target.