[lldb] Avoid using AllowDeserializingImplementationOnly
#11491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Avoid using
AllowDeserializingImplementationOnly
in LLDB as it's known to cause issues. It forces loading previously ignored dependencies in the middle of active deserialization when they are referenced by other deserialized entities, that is after the upfront loading of dependencies. Loading a dependency during deserialization changes states expected to be immutable at that time. Here it fails at iterating over the list of loaded modules to collect extensions as the list of loaded module changes from discovered extensions triggering loading more modules.This mode is also incompatible with explicit builds as it loads and builds dependencies on demand.
Hidden dependencies should be loaded upfront when desired. This used to be controlled by
DebuggerSupport
, it has now moved toImportNonPublicDependencies
but it seems to be disabled. We should address this feature at that level.The only use of
AllowDeserializingImplementationOnly
in the compiler was disabled recently swiftlang/swift#82499, LLDB is the last remaining client.rdar://161130319