-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to set run options/diagnostics in schemes #325
Comments
Any progress? |
No progress here. I just replied to another issue requesting scheme changes #538
Any thoughts around this? Would schemes created in Xcode suffice? |
I'd say asking for help from community would make life easier for yourself. |
We do have lots of contributors and quite a few collaborators in the project, as well as CONTRIBUTING doc (this could be fleshed out much more though) The issue is one of general maintainability and what XcodeGen should focus on. PR's that add properties like this are definitely welcome, but that doesn't mean it will be maintained in the future to the same degree as the core |
Referencing my question from Friday: #596. Will close it because this issue covers the question in broader detail. Have there been any updates on this? |
No updates here other than a PR for I'm thinking the best short term option is to add an option |
WORKAROUND: Easiest way for me to patch that is python script
postGenCommand: >-
schemes="MyScheme MySchemeUI";
echo "Manually patching '${schemes}' to enable Thread Sanitizer.";
for scheme in $schemes ;
do
FILE="MyProject.xcodeproj/xcshareddata/xcschemes/${scheme}.xcscheme";
echo "Patching ${FILE}...";
python3 patch_thread_sanitizer.py "${FILE}";
done
import xml.etree.ElementTree as ET
import sys
import argparse
def patch_thread_sanitizer(file_path: str):
"""
Patch Scheme and set Thread Sanitizer=YES
"""
tree = ET.parse(file_path)
root = tree.getroot()
found_launch_action = False
for child in root:
if child.tag == 'LaunchAction':
found_launch_action = True
child.attrib['enableThreadSanitizer'] = 'YES'
if found_launch_action:
tree.write(file_path)
else:
sys.exit(f"Unable to locate LaunchAction in {file_path}. Aborting patch!")
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("scheme_path", help="Path to xcscheme file")
args = parser.parse_args()
patch_thread_sanitizer(args.scheme_path) Inspired by TestPlan patch #846 (comment) |
If this is something currently supported, let me know and I can make it more clear in the docs.
The "run" options in a scheme have several options that are unable to be set via XcodeGen. Namely those in the "Options" and "Diagnostics" tabs:
Setting one of these options results in fairly irregular output in the resulting
xcscheme
file. This example shows what is generated for enabling the thread sanitizer and zombies:It would be great to have first-class support for these fields in YAML. i.e.:
The text was updated successfully, but these errors were encountered: