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

Update remote swift debugging doc #841

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

keith
Copy link
Member

@keith keith commented Jun 10, 2022

As far as I can tell at this point the local debugging options enabled
module is no longer required at least with Swift 5.6+, as long as you
correctly set the framework search paths to include the directories
containing XCTest.

As far as I can tell at this point the local debugging options enabled
module is no longer required at least with Swift 5.6+, as long as you
correctly set the framework search paths to include the directories
containing XCTest.
@lyft-lint-bot
Copy link

Lyft integration job started: https://buildkite.com/lyft/rules-swift/builds/408 (must be Lyft employee to view)

@brentleyjones
Copy link
Collaborator

I've seen otherwise. I was going to have to set lots of LLDB settings, and it wouldn't fully cover every situation that _LocalDebugOptions would cover.

I'll test again next week and report some detailed findings here. Maybe I was holding it wrong.

@keith
Copy link
Member Author

keith commented Jun 11, 2022

Yea I'd love to see any case you can come up with. I dropped this internally and it seems to work in my testing. Although it's a bit sketchy sometimes because I found I had to kill lldb-rpc-server sometimes to invalidate it's cache

@brentleyjones
Copy link
Collaborator

I re-read your changes. They are technically correct, since setting target.swift-framework-search-paths, target.clang-module-search-paths, etc. will work around most issues. I asked about this here though: https://ios-dev-at-scale.slack.com/archives/C019VJ6LK2T/p1651788632722239, and my main concern is if you end up using different flags for PCM compilation, or having same named frameworks at different paths, for various top-level targets. Maybe that will never really happen in practice, but it's been my main hesitation to not telling people about the _LocalDebugOptions technique.

@keith
Copy link
Member Author

keith commented Jun 13, 2022

If I understand that conversation correctly I don't think we're really solving that in the original solution or this new solution as we still recommend you disable that globally, so if there isn't 1 set of flags that works for you (that are also the ones passed to the local debug options module), it wouldn't work either way since you're dropping these for all the others regardless? So you could just set the one set of flags that would otherwise apply to your single local module to the lldb setting? I think the real solution in general is #842 but I don't have time to investigate that at the moment

@keith
Copy link
Member Author

keith commented Jul 7, 2022

bump, am i missing a case with this?

@keith
Copy link
Member Author

keith commented Sep 2, 2022

@brentleyjones bump

@brentleyjones
Copy link
Collaborator

Setup a lldbinit that restores any of the options that were intended to be set in the swiftmodule files

It does require more than you state in the PR description, when dealing with Objective-C dependencies. And Use `-serialize-debugging-options` locally in one empty module can be a nice solution for some. Doing the lldbinit correctly can be tricky: https://github.com/buildbuddy-io/rules_xcodeproj/blob/f95830d20cbee5fb30ccca95db1574cc10844548/tools/generator/src/Generator/CreateFilesAndGroups.swift#L634-L841

But, since rules_xcodeproj now solves this for any use case I'm going to recommend, I'm fine with removing that portion 🤷‍♂️.

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.

None yet

3 participants