dagger/dagger · error
updating local %s is not supported
Error message
updating local %s is not supported
What it means
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').
Source
Thrown at core/schema/modulesource.go:1776
},
},
)
if err != nil {
return nil, fmt.Errorf("failed to load existing %s: %w", accessor.typ, err)
}
updatedItemID, err := updatedItem.ID()
if err != nil {
return nil, fmt.Errorf("failed to get updated %s ID: %w", accessor.typ, err)
}
newUpdatedArgs = append(newUpdatedArgs, dagql.NewID[*core.ModuleSource](updatedItemID))
continue
}
if existingItem.Self().Kind == core.ModuleSourceKindLocal {
for updateReq := range updateReqs {
if updateReq.symbolic == existingItem.Self().ModuleName {
return nil, fmt.Errorf("updating local %s is not supported", accessor.typ.Plural())
}
var contextRoot string
switch parentSrc.Self().Kind {
case core.ModuleSourceKindLocal:
contextRoot = parentSrc.Self().Local.ContextDirectoryPath
case core.ModuleSourceKindGit:
contextRoot = "/"
default:
return nil, fmt.Errorf("unknown module source kind: %s", parentSrc.Self().Kind)
}
parentSrcRoot := filepath.Join(contextRoot, parentSrc.Self().SourceRootSubpath)
itemSrcRoot := filepath.Join(contextRoot, existingItem.Self().SourceRootSubpath)
existingSymbolic, err := pathutil.LexicalRelativePath(parentSrcRoot, itemSrcRoot)
if err != nil {
return nil, fmt.Errorf("failed to get relative path: %w", err)
}View on GitHub (pinned to 82ba2681db)
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.
Example fix
// before
mod.UpdateDependencies(ctx, []string{"mylocaldep", "github.com/x/y"})
// after
mod.UpdateDependencies(ctx, []string{"github.com/x/y"}) // local deps updated by editing source files Defensive patterns
Strategy: validation
Validate before calling
// Go: filter out local deps before requesting updates
var updatable []string
for _, dep := range mod.Self().GetRelatedModules(relType) {
if dep.Self().Kind != core.ModuleSourceKindLocal {
updatable = append(updatable, dep.Self().ModuleName)
}
}
mod.UpdateDependencies(ctx, updatable) Type guard
func isLocalDep(src *core.ModuleSource) bool { return src.Kind == core.ModuleSourceKindLocal } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- no source
- no source
- module provenance: module %q has no source
- module provenance: unexpected module source kind %q
- failed to parse ref string: %w
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/a8d24b8a2695a394.
Report an issue: GitHub.