{"record":{"id":"a8d24b8a2695a394","repo":"dagger/dagger","slug":"updating-local-s-is-not-supported","errorCode":null,"errorMessage":"updating local %s is not supported","messagePattern":"updating local (.+?) is not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/schema/modulesource.go","lineNumber":1776,"sourceCode":"\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to load existing %s: %w\", accessor.typ, err)\n\t\t\t}\n\n\t\t\tupdatedItemID, err := updatedItem.ID()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to get updated %s ID: %w\", accessor.typ, err)\n\t\t\t}\n\t\t\tnewUpdatedArgs = append(newUpdatedArgs, dagql.NewID[*core.ModuleSource](updatedItemID))\n\t\t\tcontinue\n\t\t}\n\n\t\tif existingItem.Self().Kind == core.ModuleSourceKindLocal {\n\t\t\tfor updateReq := range updateReqs {\n\t\t\t\tif updateReq.symbolic == existingItem.Self().ModuleName {\n\t\t\t\t\treturn nil, fmt.Errorf(\"updating local %s is not supported\", accessor.typ.Plural())\n\t\t\t\t}\n\n\t\t\t\tvar contextRoot string\n\t\t\t\tswitch parentSrc.Self().Kind {\n\t\t\t\tcase core.ModuleSourceKindLocal:\n\t\t\t\t\tcontextRoot = parentSrc.Self().Local.ContextDirectoryPath\n\t\t\t\tcase core.ModuleSourceKindGit:\n\t\t\t\t\tcontextRoot = \"/\"\n\t\t\t\tdefault:\n\t\t\t\t\treturn nil, fmt.Errorf(\"unknown module source kind: %s\", parentSrc.Self().Kind)\n\t\t\t\t}\n\n\t\t\t\tparentSrcRoot := filepath.Join(contextRoot, parentSrc.Self().SourceRootSubpath)\n\t\t\t\titemSrcRoot := filepath.Join(contextRoot, existingItem.Self().SourceRootSubpath)\n\t\t\t\texistingSymbolic, err := pathutil.LexicalRelativePath(parentSrcRoot, itemSrcRoot)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"failed to get relative path: %w\", err)\n\t\t\t\t}","sourceCodeStart":1758,"sourceCodeEnd":1794,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/schema/modulesource.go#L1758-L1794","documentation":"moduleSourceUpdateItems refuses to 'update' local-kind dependencies/toolchains: a local module's version is the files on disk, so there is nothing to re-resolve. If an update request names a local item (by module name or by relative path symbolic), this error is returned for accessor.typ.Plural() (e.g. 'updating local dependencies is not supported').","triggerScenarios":"Calling moduleSource.updateDependencies([\"mylocaldep\"]) or updateToolchains naming a local-kind related module (matched by ModuleName or by its path relative to the parent's root), or running a blanket update that matches a local dependency's name.","commonSituations":"Running a blanket 'update all dependencies' while the module has local (same-repo) dependencies; explicitly passing a local module path like '../mydep' to updateDependencies; scripts iterating dependency names without filtering local ones.","solutions":["Exclude local dependencies from the update list — pass only git/dir dependency names or refs to updateDependencies.","Update local dependencies by editing the files in the repository directly; there is no version to bump.","Filter names in scripts: only include dependencies whose source kind is git (check dagger.json sources).","If a blanket update is desired, note local deps are skipped intentionally only when they don't match a requested symbolic; scope update args to non-local items."],"exampleFix":"// before\nmod.UpdateDependencies(ctx, []string{\"mylocaldep\", \"github.com/x/y\"})\n// after\nmod.UpdateDependencies(ctx, []string{\"github.com/x/y\"}) // local deps updated by editing source files","handlingStrategy":"validation","validationCode":"// Go: filter out local deps before requesting updates\nvar updatable []string\nfor _, dep := range mod.Self().GetRelatedModules(relType) {\n    if dep.Self().Kind != core.ModuleSourceKindLocal {\n        updatable = append(updatable, dep.Self().ModuleName)\n    }\n}\nmod.UpdateDependencies(ctx, updatable)","typeGuard":"func isLocalDep(src *core.ModuleSource) bool { return src.Kind == core.ModuleSourceKindLocal }","tryCatchPattern":null,"preventionTips":["Never pass local module names/paths to updateDependencies/updateToolchains","Filter local dependencies out of scripted bulk updates","Update local dependencies by editing their source files, not via update calls","Check each dependency's source kind in dagger.json before updating"],"tags":["dagger","module-source","local-dependency","unsupported-operation"],"backgroundTag":"local-dependency-update-unsupported","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"}