Skip to content

Migrating a pre-1.0 dagger.json on default settings silently drops dependencies, toolchains, blueprint and even a foreign SDK #88

Closed

Description

@TomChv

Problem

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

  1. added
    bug
    on Oct 12, 2026
  2. TomChv commented on Oct 13, 2026

    @TomChv
    MemberAuthor

    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.

  3. added 6 commits that reference this issue on Oct 13, 2026
    0aa82c0
    88e58db
    66da0fb
    658e255
    b973c8b
    5a1556d
  4. added a commit that references this issue on Oct 21, 2026
    686e908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions