Replies: 2 comments 3 replies
-
The keyval module was designed by and for projects using configurations similar to the linux kernel Kconfig (the module was originally called the "kconfig" module). It's assumed to be part of your source code and users edit it externally, then run meson. If the keyval file being loaded does change for any reason, it triggers a reconfigure. run_command is basically "unclean" as it were. Using it goes outside of meson's predictions of what your build looks like, we cannot reconfigure if the expected output changes, etc. There are still lots of scenarios where it's vital for use and there is no replacement, but I'm nervous about anything that looks like trying to define the build graph in this manner, and I feel uncomfortable making changes that result in it looking "too attractive" to the unsuspecting. Still, maybe another maintainer has a different opinion. /cc @dcbaker @jpakkane @xclaesse. |
Beta Was this translation helpful? Give feedback.
-
Hm. What if meson had an Then it would be clear that the user really should avoid using it. It does feel like reading through the various issues/SO posts, that there's lots of features that people ask for that are.. sometimes reasonable in extreme circumstances, but most people shouldn't do them. Honestly, you could add things like glob to an unsafe module too... haha. |
Beta Was this translation helpful? Give feedback.
-
I'd like an easy way to create a Meson dictionary from a JSON-formatted string.
The use case I'm thinking of is to make it easier to use external scripts to generate structured data that can be used in a build script. For example doing something like this is currently very hard to do if you need more than just key/value data:
I'm not sold on the method name, it could also be
asDict
orfromJson
or various other options.I'd be happy to make a PR for this if there's support for it.
An alternative approach would be to add a
json
module like thekeyval
module, but that seems a bit more clunky.Beta Was this translation helpful? Give feedback.
All reactions