dagger/dagger · error
legacy customization arg %q clear default address: %w
Error message
legacy customization arg %q clear default address: %w
What it means
Wraps a failure from the dagql Select calling `__withDefaultAddress` with an empty string, used to clear any existing default address when a legacy DefaultPath is being set (core/module.go:707). Legacy semantics made defaultPath and defaultAddress mutually exclusive.
Source
Thrown at core/module.go:707
if err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{
Field: "__withDefaultValue",
Args: []dagql.NamedInput{{Name: "defaultValue", Value: jsonValue}},
}); err != nil {
return updatedArg, fmt.Errorf("legacy customization arg %q default value: %w", argSelf.Name, err)
}
}
if cust.DefaultPath != "" {
if err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{
Field: "__withDefaultPath",
Args: []dagql.NamedInput{{Name: "defaultPath", Value: dagql.String(cust.DefaultPath)}},
}); err != nil {
return updatedArg, fmt.Errorf("legacy customization arg %q default path: %w", argSelf.Name, err)
}
if err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{
Field: "__withDefaultAddress",
Args: []dagql.NamedInput{{Name: "defaultAddress", Value: dagql.String("")}},
}); err != nil {
return updatedArg, fmt.Errorf("legacy customization arg %q clear default address: %w", argSelf.Name, err)
}
}
if cust.DefaultAddress != "" {
if err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{
Field: "__withDefaultAddress",
Args: []dagql.NamedInput{{Name: "defaultAddress", Value: dagql.String(cust.DefaultAddress)}},
}); err != nil {
return updatedArg, fmt.Errorf("legacy customization arg %q default address: %w", argSelf.Name, err)
}
if err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{
Field: "__withDefaultPath",
Args: []dagql.NamedInput{{Name: "defaultPath", Value: dagql.String("")}},
}); err != nil {
return updatedArg, fmt.Errorf("legacy customization arg %q clear default path: %w", argSelf.Name, err)
}
}
if len(cust.Ignore) > 0 {
if err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{View on GitHub (pinned to 82ba2681db)
Solutions
- Update the module SDK/codegen so the mutual-exclusion semantics are handled natively.
- Set only one of DefaultPath or DefaultAddress in the customization, not a transition between them.
- Confirm the argument is a service-address-compatible type before touching defaultAddress.
- Reload module and retry if the engine error was transient.
Defensive patterns
Strategy: try-catch
Try / catch
if err := loadModule(ctx); err != nil {
if strings.Contains(err.Error(), "clear default address") {
// update SDK so legacy path/address mutual exclusion is handled natively
}
} Prevention
- Set only one of defaultPath/defaultAddress per argument
- Use current SDK APIs instead of legacy customizations
- Test module loads after engine upgrades
When it happens
Trigger: After applying DefaultPath, the clear-address select fails — the argument TypeDef doesn't support `__withDefaultAddress` (wrong type kind) or the query errored.
Common situations: Legacy modules with directory-type arguments transitioning from a defaultAddress to a defaultPath; version-skew between engine and module SDK.
Related errors
- legacy customization arg %q default address: %w
- legacy customization arg %q optional type: %w
- legacy customization arg %q optional type id: %w
- legacy customization arg %q optional type apply: %w
- legacy customization arg %q default value: %w
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/df8ff3cc5a927dda.
Report an issue: GitHub.