Skip to content
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

fix script generation to not comment out the first line #481

Merged
merged 2 commits into from
Oct 19, 2020

Conversation

Ukalnins
Copy link

@Ukalnins Ukalnins commented Oct 9, 2020

Seems that noone is using the deadlock timer.

@gabebear
Copy link

gabebear commented Oct 9, 2020

What versions of Xcode has this been tested in? The last time this escaping was tweaked was because of a problem parsing it in Xcode 10 69b24ca.

Since this has broken on Xcode versions before ideally want to test at least:

  • Xcode11 on Mojave
  • Xcode12 on Catalina
  • Xcode12 on Big Sur

I don't have any Mojave Macs anymore, but could check the others if you haven't.

@gabebear
Copy link

gabebear commented Oct 9, 2020

The multi-nested escaping makes my head hurt.

  • XML .pbxproj file containing:
    • bash script containing:
      • both double-quoted and single-quoted strings containing:
        • backslash escaped characters containing:
          • ObjC code containing:
            • Python code.

Is it time to kill this script and the .py file and just check in the .py.h file?

@Ukalnins
Copy link
Author

Ukalnins commented Oct 9, 2020

I'm running Xcode-12 on Catalina, so it works on that. I can check Big Sur on monday.

I would be against retiring the separate python script as it simplifies development of the script. Though I agree that the number of nested escaping is complicated and hacky as hell. Maybe splitting it out generation as a separate script help?

@gabebear
Copy link

gabebear commented Oct 9, 2020

Hmmm... what about switching to raw-literal-strings? C++11(and ObjC++) supports them in this format:

const char* python_script = R"prx63htg4(
import time
import os
import sys
import shlex
import lldb

blah blah...
)prx63htg4";

Swift's """ literal syntax is nice, but has severe drawbacks since the Swift runtime only started shipping in MacOS 10.14.4... SOOOOooo wish ObjC supported them for NSString.

@gabebear gabebear merged commit 862f0c2 into ios-control:master Oct 19, 2020
@gabebear
Copy link

Going to go ahead and merge rather than overthink it

@Ukalnins
Copy link
Author

Hi, sorry, got sick and forgot about this PL.

I really like your idea, we can just put it in a separate cpp file. I'll create a PL when I have the time.

@Ukalnins Ukalnins deleted the fix-script-generation branch October 20, 2020 05:47
@gabebear
Copy link

No worries, thanks for all the hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants