You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrating a pre-1.0 dagger.json on default settings silently drops dependencies, toolchains, blueprint and even a foreign SDK #88
On default settings (the entrypoint layout, since #73), migrating a scope that has only a dagger.json deletes that file and writes a fresh manifest that carries none of what it declared. Exit 0, no message.
Lost: [[dependencies]], include, source, toolchains, blueprint — and even a foreign "sdk": {"source": "go"}, which gets scaffolded over as a TypeScript module.
Why
generateScope passes hasToml, never hasJSON:
let configured = if (legacyRuntime == false) {
withEntrypointManifest(seeded, scope, name, hasToml)
} else if (hasToml and isEntrypointManifest(...) == false) {
seeded
} else {
withModuleManifest(seeded, scope, name, hasJSON) // <- every migration guard lives here
}
With only a dagger.json, hasToml is false, so withEntrypointManifest builds a fresh empty manifest and never loads the file — while sdk-helpers' generate(legacyJson: false) deletes it. The refusals for toolchains / blueprint / a non-TypeScript SDK, and the dependency round-trip, all live in withModuleManifest's hasJSON branch, which the default path never reaches.
#85's subdirectory-source refusal is the one guard that does fire on the default path, precisely because it reads the config the scope arrived with rather than the branch.
Observed
m1d: v0.21.9 module with [[dependencies]] dep -> ../dep → manifest has no dependencies, no dep client generated, call fails Cannot find package '@dagger.io/dep' imported from /workspace/.dagger/modules/app/src/index.ts.
m5-toolchains-default, m5-not-ts-default: dagger.json deleted, TypeScript [entrypoint] manifest written over a Go module, package.json/tsconfig.json/clients/dagger//entrypoint/main.dang scaffolded.
With legacyRuntime = true all of these behave correctly (refusals fire, dependencies carry over) — so the logic exists, it is just on the branch that is no longer the default.
Expected
The default path should either carry the dagger.json's content across, or refuse the way #85 does — naming what it cannot carry. Silently discarding a module's declared dependencies and SDK is the worst option.
Found verifying @main (d97f678) on engine v1.0.0-beta.16. Repros: verify/migration/m1d-*, m5-toolchains-default, m5-not-ts-default.
Activity
TomChv commentedon Oct 13, 2026
It's normal that we lose these fields since manifest v2 doesn't support these.
So they should disappear, however we must make sure they are correctly moved to the dagger.toml so the module keeps working.
fix: refuse to move a dagger.json an entrypoint cannot carry onto one
fix: refuse to move a dagger.json an entrypoint cannot carry onto one
fix: refuse to move a dagger.json an entrypoint cannot carry onto one
fix: leave a pre-1.0 dagger.json to the engine's runtime
fix: leave a pre-1.0 dagger.json to the engine's runtime
fix: leave a pre-1.0 dagger.json to the engine's runtime
fix: leave a pre-1.0 dagger.json to the engine's runtime (dagger#97)