(state *importBFSState, nestedImportPath, nestedFullPath, nestedSectionName, baseDir string, inputs map[string]any, nestedRemoteOrigin *remoteImportOrigin)
| 466 | } |
| 467 | |
| 468 | func enqueueNestedVisitedPath(state *importBFSState, nestedImportPath, nestedFullPath, nestedSectionName, baseDir string, inputs map[string]any, nestedRemoteOrigin *remoteImportOrigin) error { |
| 469 | if !setutil.Contains(state.visited, nestedFullPath) { |
| 470 | state.visited[nestedFullPath] = struct{}{} |
| 471 | state.visitedInputs[nestedFullPath] = inputs |
| 472 | state.queue = append(state.queue, importQueueItem{ |
| 473 | importPath: nestedImportPath, fullPath: nestedFullPath, sectionName: nestedSectionName, baseDir: baseDir, inputs: inputs, remoteOrigin: nestedRemoteOrigin, |
| 474 | }) |
| 475 | parserLog.Printf("Discovered nested import: %s (queued)", nestedFullPath) |
| 476 | return nil |
| 477 | } |
| 478 | if err := checkImportInputsConsistency(nestedImportPath, state.visitedInputs[nestedFullPath], inputs); err != nil { |
| 479 | return err |
| 480 | } |
| 481 | parserLog.Printf("Skipping already visited nested import: %s (cycle detected)", nestedFullPath) |
| 482 | return nil |
| 483 | } |
| 484 | |
| 485 | // parseImportSpecsFromArray parses an []any slice into a list of ImportSpec values. |
| 486 | // Each element must be a string (simple path) or a map with a required "path" or "uses" |
no test coverage detected