blt icon indicating copy to clipboard operation
blt copied to clipboard

Print target properties recursively and with regular expressions

Open chapman39 opened this issue 2 years ago • 11 comments

Adds three more arguments to blt_print_target_properties

  • CHILDREN (true/ false) whether or not you want to print the target's children's properties as well (recursively)
  • PROPERTY_NAME_REGEX (regular expression string) reduce which properties to print by name
  • PROPERTY_VALUE_REGEX (regular expression string) reduce which properties to print by value

Each target will only have its properties printed once

Also adds .gitignore file to ignore a VSCode file

chapman39 avatar Aug 03 '22 23:08 chapman39

@chapman39 don't forget to update the docs here: docs/api/target_properties.rst

As well as adding a message in the RELEASE-NOTES.md

white238 avatar Aug 19 '22 05:08 white238

Ready for review

chapman39 avatar Sep 13 '22 21:09 chapman39

This currently allows filtering based on property names. For example, INCLUDE will print both INTERFACE_INCLUDE_DIRECTORIES and INCLUDE_DIRECTORIES. @chapman39 is going to add the ability to filter based on property values as well.

@kennyweiss , do you like which set of parameter names:

  • PROP_NAME_REGEX and PROP_VALUE_REGEX
  • PROPERTY_NAME_REGEX and PROPERTY_VALUE_REGEX

The latter is verbose but at least I wont have to remember what word we truncated. Thoughts?

white238 avatar Sep 13 '22 23:09 white238

longer argument names, now can filter by property value.

chapman39 avatar Sep 14 '22 23:09 chapman39

decided to keep some extra code in tests/internal for the blt_registered case. if i should remove it, or replace with less generic names (foo and bar) lmk.

chapman39 avatar Sep 14 '22 23:09 chapman39

@kennyweiss , do you like which set of parameter names: * PROP_NAME_REGEX and PROP_VALUE_REGEX * PROPERTY_NAME_REGEX and PROPERTY_VALUE_REGEX The latter is verbose but at least I wont have to remember what word we truncated. Thoughts?

I more verbose options seem clearer to me -- PROPERTY_NAME_REGEX and PROPERTY_VALUE_REGEX

kennyweiss avatar Sep 15 '22 02:09 kennyweiss

Also: Looks like the Mac Image version will need to be updated: https://dev.azure.com/llnl-blt/BLT/_build/results?buildId=1328&view=logs&j=8dab7c2a-824f-53c4-ff36-17cdfa82e5d3

https://github.com/LLNL/blt/blob/7b3b13dd55eb847ec2d17c87adfe16c872d634e8/azure-pipelines.yml#L53-L55

bmhan12 avatar Sep 22 '22 17:09 bmhan12

Built docs are here:

https://llnl-blt.readthedocs.io/en/feature-chapman39-print_target_properties_recursive/api/target_properties.html#blt-print-target-properties

white238 avatar Sep 22 '22 18:09 white238

Also: Looks like the Mac Image version will need to be updated: https://dev.azure.com/llnl-blt/BLT/_build/results?buildId=1328&view=logs&j=8dab7c2a-824f-53c4-ff36-17cdfa82e5d3

https://github.com/LLNL/blt/blob/7b3b13dd55eb847ec2d17c87adfe16c872d634e8/azure-pipelines.yml#L53-L55

Well i was originally going to say address this after but its blocking the builds. @chapman39 can you fix this before merging?

white238 avatar Sep 22 '22 18:09 white238

Passing osx_gcc, but now I'm failing three of the gitlab tests since it's saying I'm an unauthorized user (or maybe it's referring to a service user?)

chapman39 avatar Sep 23 '22 00:09 chapman39

Passing osx_gcc, but now I'm failing three of the gitlab tests since it's saying I'm an unauthorized user (or maybe it's referring to a service user?)

Not sure what the problem was. I retried and it passed.

white238 avatar Sep 23 '22 02:09 white238