Skip to content

Commit 87aaf4e

Browse files
committed
take out emit-extension-symbols related assertions
1 parent c389168 commit 87aaf4e

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

Sources/SymbolGraphCompiler/SSGC.TypeChecker.swift

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -258,41 +258,20 @@ extension SSGC.TypeChecker
258258
return
259259
}
260260

261-
guard self.ignoreExportedInterfaces || member.culture == culture
262-
else
263-
{
264-
throw AssertionError.init(message: """
265-
Found cross-module member relationship \
266-
(from \(member.culture) in \(culture)), which should not be possible in \
267-
symbol dumps generated with '-emit-extension-symbols'
268-
""")
269-
}
270-
271261
switch relationship.target
272262
{
273263
case .vector(let symbol):
274264
// Nothing can be a member of a vector symbol.
275265
throw SSGC.UnexpectedSymbolError.vector(symbol)
276266

277267
case .scalar(let scope):
278-
// We should never see an external type reference here either.
279268
guard
280269
let scope:SSGC.DeclObject = self.declarations[visible: scope]
281270
else
282271
{
283272
return
284273
}
285274

286-
guard self.ignoreExportedInterfaces || scope.culture == culture
287-
else
288-
{
289-
throw AssertionError.init(message: """
290-
Found cross-module member relationship \
291-
(to \(scope.culture) in \(culture)), which should not be possible in \
292-
symbol dumps generated with '-emit-extension-symbols'
293-
""")
294-
}
295-
296275
// Enum cases are considered intrinsic members of their parent enum.
297276
if case .case = member.value.phylum
298277
{
@@ -358,16 +337,6 @@ extension SSGC.TypeChecker
358337
return
359338
}
360339

361-
guard self.ignoreExportedInterfaces || type.culture == culture
362-
else
363-
{
364-
throw AssertionError.init(message: """
365-
Found cross-module conformance relationship \
366-
(from \(type.culture) in \(culture)), which should not be possible in \
367-
symbol dumps generated with '-emit-extension-symbols'
368-
""")
369-
}
370-
371340
if let origin:Symbol.Decl = conformance.origin
372341
{
373342
type.assign(origin: origin)
@@ -422,14 +391,6 @@ extension SSGC.TypeChecker
422391
return
423392
}
424393

425-
guard self.ignoreExportedInterfaces || subform.culture == culture
426-
else
427-
{
428-
throw AssertionError.init(message: """
429-
Found retroactive superform relationship (from \(subform.culture) in \(culture))
430-
""")
431-
}
432-
433394
try subform.add(superform: relationship)
434395

435396
/// Having a universal witness is not intrinsic, but it is useful to know
@@ -459,8 +420,6 @@ extension SSGC.TypeChecker
459420
throw SSGC.UnexpectedSymbolError.vector(symbol)
460421

461422
case .scalar(let symbol):
462-
// If the colonial graph was generated with '-emit-extension-symbols',
463-
// we should never see an external type reference here.
464423
if let decl:SSGC.DeclObject = self.declarations[visible: symbol]
465424
{
466425
heir = decl
@@ -470,16 +429,6 @@ extension SSGC.TypeChecker
470429
return
471430
}
472431

473-
guard self.ignoreExportedInterfaces || heir.culture == culture
474-
else
475-
{
476-
throw AssertionError.init(message: """
477-
Found direct cross-module feature inheritance relationship in culture \
478-
'\(culture)' adding feature '\(feature.value.path)' to type \
479-
'\(heir.value.path)' from '\(heir.culture)', which should not be \
480-
possible in symbol dumps generated with '-emit-extension-symbols'
481-
""")
482-
}
483432
guard heir.id == relationship.source.heir
484433
else
485434
{

0 commit comments

Comments
 (0)