Merge remote-tracking branch 'origin/main' into manually-merge-main-to-rebranch

Conflicts:
  - `lib/PrintAsClang/PrintSwiftToClangCoreScaffold.cpp` not positive
    what the cause here was, just took main.
This commit is contained in:
Ben Barham
2024-08-06 13:44:27 -07:00
80 changed files with 1867 additions and 748 deletions

View File

@@ -1802,7 +1802,7 @@ std::string ModuleFileSharedCore::resolveModuleDefiningFilePath(const StringRef
ModuleLoadingBehavior
ModuleFileSharedCore::getTransitiveLoadingBehavior(
const Dependency &dependency,
bool debuggerMode,
bool importNonPublicDependencies,
bool isPartialModule,
StringRef packageName,
bool forTestable) const {
@@ -1818,7 +1818,7 @@ ModuleFileSharedCore::getTransitiveLoadingBehavior(
if (dependency.isImplementationOnly()) {
// Implementation-only dependencies are not usually loaded from
// transitive imports.
if (debuggerMode || forTestable) {
if (importNonPublicDependencies || forTestable) {
// In the debugger, try to load the module if possible.
// Same in the case of a testable import, try to load the dependency
// but don't fail if it's missing as this could be source breaking.
@@ -1836,7 +1836,7 @@ ModuleFileSharedCore::getTransitiveLoadingBehavior(
// on testable imports.
if (forTestable || !moduleIsResilient) {
return ModuleLoadingBehavior::Required;
} else if (debuggerMode) {
} else if (importNonPublicDependencies) {
return ModuleLoadingBehavior::Optional;
} else {
return ModuleLoadingBehavior::Ignored;
@@ -1850,7 +1850,7 @@ ModuleFileSharedCore::getTransitiveLoadingBehavior(
forTestable ||
!moduleIsResilient) {
return ModuleLoadingBehavior::Required;
} else if (debuggerMode) {
} else if (importNonPublicDependencies) {
return ModuleLoadingBehavior::Optional;
} else {
return ModuleLoadingBehavior::Ignored;