XcodeSelectiveTesting icon indicating copy to clipboard operation
XcodeSelectiveTesting copied to clipboard

Consider paths in Build Settings preferences

Open Ernest0-Production opened this issue 1 year ago • 1 comments

In the target's Build settings, some values contain path to some files that are not explicitly referenced to the target as sources and resources.

It would be nice to extract a list of these files paths automatically by scanning the build settings of the target (without using extras)

Ernest0-Production avatar Dec 01 '24 22:12 Ernest0-Production

Hey @Ernest0-Production , thanks for the input. I think it would make sense to consider those. However, it's always hard to draw the line between what is a reasonable effort to understand the project structure.

In some setups, people use xcconfigs to set up the build settings. Parsing them with xcodebuild is a performance burden for the tool (as it resolves xcode package graph before printing), and wrting own parser is too much of an effort (configs can import other configs, configuration is multilevel with project and target levels). Unfortunately, XcodeProj package that I am using does not provide this out of the box.

Additionally, some build-time options might contain paths, but require a custom parsing. Like linker flags might point to a static library, or a framework.

I think a good potential shortcut is to link those files manually via .xcode-selective-testing.yml as described here

What do you think, would it cover your use case? Or you would prefer to have a mode of the tool that would ask Xcode for the build settings?

mikeger avatar Dec 02 '24 09:12 mikeger