{"record":{"id":"e882494dec0bb302","repo":"dagger/dagger","slug":"stage-local-dependency-q-changes-w","errorCode":null,"errorMessage":"stage local dependency %q changes: %w","messagePattern":"stage local dependency %q changes: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/schema/modulesource.go","lineNumber":3391,"sourceCode":"\t\t\tdepGens[i] = depGen{staging: depDeps, changes: depChanges}\n\t\t\treturn nil\n\t\t})\n\t}\n\tif err := jobs.Run(ctx); err != nil {\n\t\treturn res, err\n\t}\n\n\t// Fold the overlays in declaration order, off the parallel path, so the\n\t// resulting changeset is deterministic regardless of completion order.\n\t// Sibling closures share transitive dependencies, but their changesets\n\t// carry identical content for them, so overlaying converges.\n\tstagedCtx := origCtx\n\tfor i, depPath := range depPaths {\n\t\tif stagedCtx, err = overlay(stagedCtx, depGens[i].staging); err != nil {\n\t\t\treturn res, fmt.Errorf(\"stage local dependency %q closure: %w\", depPath, err)\n\t\t}\n\t\tif stagedCtx, err = overlay(stagedCtx, depGens[i].changes); err != nil {\n\t\t\treturn res, fmt.Errorf(\"stage local dependency %q changes: %w\", depPath, err)\n\t\t}\n\t}\n\n\torigID, err := origCtx.ID()\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tif err := dag.Select(ctx, stagedCtx, &res, dagql.Selector{\n\t\tField: \"changes\",\n\t\tArgs:  []dagql.NamedInput{{Name: \"from\", Value: dagql.NewID[*core.Directory](origID)}},\n\t}); err != nil {\n\t\treturn res, fmt.Errorf(\"compute staged dependency changeset: %w\", err)\n\t}\n\n\t// Deliberately workspace-root-measured, unlike generatedContextChangeset:\n\t// this changeset is intermediate staging data, consumed by\n\t// Workspace.withChanges / __withGeneratedLocalDependencies, which overlay\n\t// at the workspace root — it is never handed to a client to apply at its","sourceCodeStart":3373,"sourceCodeEnd":3409,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/schema/modulesource.go#L3373-L3409","documentation":"In the local-dependency generation flow: overlaying a dependency's staged `changes` changeset onto the accumulated staged context failed while folding overlays in declaration order, so the deterministic workspace changeset cannot be built.","triggerScenarios":"Thrown at core/schema/modulesource.go:3391 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped overlay error for the offending path in the dependency changeset","Ensure the dependency generator only writes within the dependency's directory","Fix the generator output and re-run generation"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}