@@ -794,8 +794,14 @@ static bool isSDKNodeEqual(SDKContext &Ctx, const SDKNode &L, const SDKNode &R)
794794 return false ;
795795 if (Left->getPrintedName () == Right->getPrintedName ())
796796 return true ;
797- return Left->getName () == Right->getName () &&
798- Left->hasSameChildren (*Right);
797+ if (Ctx.checkingABI ()) {
798+ // For abi checking where we don't have sugar types at all, the printed
799+ // name difference is enough to indicate these two types differ.
800+ return false ;
801+ } else {
802+ return Left->getName () == Right->getName () &&
803+ Left->hasSameChildren (*Right);
804+ }
799805 }
800806
801807 case SDKNodeKind::DeclFunction: {
@@ -1082,16 +1088,20 @@ StringRef printGenericSignature(SDKContext &Ctx, ArrayRef<Requirement> AllReqs)
10821088 return StringRef ();
10831089 OS << " <" ;
10841090 bool First = true ;
1091+ PrintOptions Opts = PrintOptions::printInterface ();
1092+ // We always print unqualifed type names to avoid false positives introduced
1093+ // by the heuristics working differently.
1094+ Opts.FullyQualifiedTypesIfAmbiguous = false ;
10851095 for (auto Req: AllReqs) {
10861096 if (!First) {
10871097 OS << " , " ;
10881098 } else {
10891099 First = false ;
10901100 }
10911101 if (Ctx.checkingABI ())
1092- getCanonicalRequirement (Req).print (OS, PrintOptions::printInterface () );
1102+ getCanonicalRequirement (Req).print (OS, Opts );
10931103 else
1094- Req.print (OS, PrintOptions::printInterface () );
1104+ Req.print (OS, Opts );
10951105 }
10961106 OS << " >" ;
10971107 return Ctx.buffer (OS.str ());
@@ -2077,7 +2087,7 @@ swift::ide::api::getSDKNodeRoot(SDKContext &SDKCtx,
20772087 if (Opts.Verbose )
20782088 llvm::errs () << " Loading module: " << Name << " ...\n " ;
20792089 auto *M = Ctx.getModuleByName (Name);
2080- if (!M) {
2090+ if (!M || M-> failedToLoad () ) {
20812091 llvm::errs () << " Failed to load module: " << Name << ' \n ' ;
20822092 if (Opts.AbortOnModuleLoadFailure )
20832093 return nullptr ;
0 commit comments