[help] What is the preferred way to get attributes of an individual target? #1251
-
Help
DescriptionI'm working to get the I'm looking to extract the names and commands from the generated targets to test that they're generated correctly. The best ways that I've found to get the name and command from the generated targets are:
Are these the best ways to get the name and command, or is there a getter for target attributes? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There isn't an official exported |
Beta Was this translation helpful? Give feedback.
There isn't an official exported
targets
getter. It's generally better to control names and expressions yourself and pass them totar_target_raw()
, as opposed to relying on internal data in a target object, because the design of a target object might change in the future. However, if you absolutely must use e.g.generated_target$settings$name
, you probably won't hit problems because I have not needed to change the structure of internal target data in the 4 yearstargets
has been around.