do not set deprecated target args#1444
Conversation
|
You are right that my code was wrong: if you set Having said that, I don't think this PR addresses or fixes the actual problem. IMHO it's just side-stepping it by deleting a line of code. I think the proper fix is: for target_name, args_ in deprecated:
if args_:
if target_name in target_args:
fail("Please migrate '{t}_args' to 'target_args[\"{t}\"]'".format(t = target_name))
target_args[target_name] = args_This will be a no-op if |
I was unable to set a setup arg via `target_args`, because the value would be overridden by the empty value in `setup_args`. And if I tried to set `setup_args` I got a fail saying it was deprecated.
7fa09ac to
2540e1b
Compare
|
Thanks for responding
I suppose it depends on what you're defining as the problem :) The problem I was trying to solve was: was completely broken, and if as a side effect we deprecate But anyway, I updated the branch to your change because it is more flexible. Perhaps one day this may even be merged to main :) |
Of course 😆 "Obviously", it's deprecating the old attrs while introducing the new one! 😄 So, to do that, we do need to update
Yeah, I only added it to have the flexibility of having other Meson targets available (e.g. the introspection). I'm pretty sure 99.9% is only using the old args :D
Thanks, LGTM! 🙌
Well, it's a fix, my PR was broken and this fixes it, so I think @jsharpe will definitely consider merging it! |
|
@cerisier this is a fairly straight forward bug fix, if you're able to review |
cerisier
left a comment
There was a problem hiding this comment.
Fine with me. I'll discuss making a release that removes the deprecated fields. It's a been a while now.
I was unable to set a setup arg via
target_args, because the value would be overridden by the empty value insetup_args. And if I tried to setsetup_argsI got a fail saying it was deprecated.