We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9092a1b commit ecea1f4Copy full SHA for ecea1f4
internal/linker/linker.go
@@ -470,6 +470,10 @@ func (c *linkerContext) enforceNoCyclicChunkImports() {
470
colors[chunkIndex] = 1
471
472
for _, chunkImport := range c.chunks[chunkIndex].crossChunkImports {
473
+ // Ignore cycles caused by dynamic "import()" expressions. These are fine
474
+ // because they don't necessarily cause initialization order issues and
475
+ // they don't indicate a bug in our chunk generation algorithm. They arise
476
+ // normally in real code (e.g. two files that import each other).
477
if chunkImport.importKind != ast.ImportDynamic {
478
479
// Recursively validate otherChunkIndex
0 commit comments