rules_swift
rules_swift copied to clipboard
Update remote swift debugging doc
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 integration job started: https://buildkite.com/lyft/rules-swift/builds/408 (must be Lyft employee to view)
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.
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
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.
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 https://github.com/bazelbuild/rules_swift/issues/842 but I don't have time to investigate that at the moment
bump, am i missing a case with this?
@brentleyjones bump
Setup a
lldbinitthat restores any of the options that were intended to be set in theswiftmodulefiles
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 🤷♂️.