Skip to content

[1.0-beta] feat: support synthetic workspaces - #13217

Merged
tiborvass merged 6 commits into
1.0-betafrom
codex/synthetic-workspace-workspace
Jun 5, 2026
Merged

tiborvass merged 6 commits into
1.0-betafrom
codex/synthetic-workspace-workspace

Conversation

@dagger-codex

@dagger-codex dagger-codex Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

What this does

Adds experimental synthetic workspace construction from source objects:

  • Directory.asWorkspace(cwd:)
  • GitRepository.asWorkspace(cwd:)

There is intentionally no public root constructor like Query.workspace(dir:). The source object is the workspace boundary. Use dag.Directory().asWorkspace() when an empty synthetic workspace is needed.

cwd defaults to /. Public Workspace.cwd values are slash-style workspace paths: / at the root, /src/app for a nested cwd. Relative workspace paths resolve from cwd; absolute paths resolve from the workspace root.

Schema diff

Schema file diff: https://github.com/dagger/dagger/pull/13217/files#diff-6d45938d3a99ad730e8d639cd2218f57c90828f1deeaad17c073cad22bfd0b50

Human-readable shape of the new public GraphQL surface:

type Directory {
  asWorkspace(cwd: String = "/"): Workspace!
    @experimental(reason: "Synthetic workspaces currently support filesystem APIs only.")
}

type GitRepository {
  asWorkspace(cwd: String = "/"): Workspace!
    @experimental(reason: "Synthetic workspaces currently support filesystem APIs only.")
}

type Workspace {
  # Opaque identity for synthetic workspaces, canonical address for local workspaces.
  address: String!

  # Slash-style workspace path: "/" at the root, "/src/app" for nested cwd.
  cwd: String!
}

Reviewer notes

  • Directory.asWorkspace is a rootfs-backed filesystem workspace. workspace.git only works when the directory already contains usable .git metadata.
  • GitRepository.asWorkspace keeps git metadata so workspace.git can work. Local/dirty repos use the dirty directory when available; remote repos fall back to the HEAD tree.
  • Supported filesystem APIs: file, directory, and findUp.
  • Listing APIs return empty results when there is no loaded workspace state: checks, generators, services, moduleList, and envList.
  • Local-host/config/mutation APIs reject for synthetic workspaces: config reads/writes, init, env mutation, module init/install/uninstall, refresh/update/migrate, module settings, and directory(gitignore: true).
  • future/workspace-api-cleanup.md now records the current compatibility contract and the future cleanup needed to split filesystem views from local workspace management.

Commit layout

The PR history is split for review:

  1. core: isolate Linux-only workspace helpers
  2. core: expose source-backed workspace constructors
  3. cmd/dagger: handle slash-style workspace cwd
  4. test: cover synthetic workspace roots
  5. docs: record synthetic workspace API cleanup
  6. chore: regenerate workspace API outputs

Validation

Passed locally on the rebased stack:

  • dagger --x-release=v0.21.4 generate -y
  • go test ./core/schema ./cmd/dagger
  • go test ./core/integration -run '^$'
  • git diff --check
  • API surface check: generated schema/SDKs expose Directory.asWorkspace and GitRepository.asWorkspace; no generated root Query.workspace/Client.workspace constructor remains.

@dagger-codex
dagger-codex Bot requested a review from a team as a code owner May 25, 2026 07:03
@sagikazarmark

Copy link
Copy Markdown
Contributor

I think it should accept a path argument as well: dag.Workspace(dir, "crates/my-crate")

@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch from 583955e to 60c2a46 Compare May 25, 2026 17:50
@dagger-codex
dagger-codex Bot requested review from a team as code owners May 25, 2026 17:50
@dagger-codex dagger-codex Bot added this to the 1.0.0-beta.1 milestone May 25, 2026
@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch 3 times, most recently from 49dc17e to 1a756c6 Compare May 25, 2026 18:58
@eunomie

eunomie commented May 26, 2026

Copy link
Copy Markdown
Member

I think it should accept a path argument as well: dag.Workspace(dir, "crates/my-crate")

What would be the meaning of this path argument?
You can dag.Workspace(dir.Directory("crates/my-crate")) or dag.Workspace(dir).Directory("crates/my-crate") depending on the meaning. I think I like the fact it just transforms a directory in workspace while keeping the API minimal.

@sagikazarmark

sagikazarmark commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

What would be the meaning of this path argument?

The same as it is in a "regular" workspace.

You can dag.Workspace(dir.Directory("crates/my-crate")) or dag.Workspace(dir).Directory("crates/my-crate")

IMO that violates the Workspace API.

If a module relies on workspace.Path to achieve that, the synthetic workspace needs to work the same way.

(Side note: I said this on Discord, but I primarily need this for composing modules (ie. one module calls another directly with whatever workspace it wants)

A common case: I want to compile some app from a git repo as a dependency for my workflow. I want to give my rust/go/whatever module that I call from another module a git repo. The reused module should not be aware of how the workspace was constructed.

@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch 2 times, most recently from 1a8b7d0 to 310e89b Compare May 27, 2026 16:43
@dagger-codex
dagger-codex Bot requested a review from a team as a code owner May 27, 2026 16:43
@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch from 310e89b to efc4682 Compare May 27, 2026 17:06
@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch 7 times, most recently from e3f7562 to b830008 Compare May 28, 2026 02:55
@dagger-codex dagger-codex Bot changed the title feat: support synthetic workspaces [workspace] feat: support synthetic workspaces May 28, 2026
@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch from b830008 to 81617dc Compare May 29, 2026 06:06
@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch 5 times, most recently from be6c620 to 6202c01 Compare June 3, 2026 05:16
@dagger-codex dagger-codex Bot changed the title [workspace] feat: support synthetic workspaces [1.0-beta] [workspace] feat: support synthetic workspaces Jun 3, 2026
@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch 2 times, most recently from 88225cc to 5c0483c Compare June 4, 2026 19:09
@tiborvass
tiborvass marked this pull request as draft June 4, 2026 21:19
@dagger-codex dagger-codex Bot changed the title [1.0-beta] [workspace] feat: support synthetic workspaces [1.0-beta] feat: support synthetic workspaces Jun 4, 2026
@tiborvass
tiborvass marked this pull request as ready for review June 4, 2026 23:30
@dagger-codex
dagger-codex Bot force-pushed the codex/synthetic-workspace-workspace branch from 13dd35c to e25915c Compare June 5, 2026 00:05
shykes added 5 commits June 4, 2026 17:56
Add the public synthetic workspace entry points on source objects: Directory.asWorkspace and GitRepository.asWorkspace. The root Query.workspace constructor is removed from the public schema so callers construct workspaces from the object that owns the root.

Rootfs-backed workspaces keep filesystem APIs available, return slash-normalized cwd values, and reject local-only config/module/env mutations that require a host workspace.

Signed-off-by: Solomon Hykes <[email protected]>
Treat public workspace cwd values as slash-style API paths when deriving local roots from cwd or addresses. Nested cwd suffixes must match the working directory/address exactly, and escaping cwd values are rejected.

This fixes the review failure where the CLI still expected relative cwd values like . and app after the Workspace API switched to / and /app.

Signed-off-by: Solomon Hykes <[email protected]>
Add integration coverage for directory- and git-backed synthetic workspaces, including cwd resolution, unsupported local-only operations, empty module lists, and git metadata behavior.

Update existing workspace tests to assert the public cwd format as slash-style paths such as / and /services/api.

Signed-off-by: Solomon Hykes <[email protected]>
Add reviewer notes for the source-object constructor UX used by this PR and capture the remaining cleanup work for separating filesystem workspace APIs from local host mutation APIs.

The note documents the current compatibility contract instead of presenting the future cleanup as an accidental merge blocker.

Signed-off-by: Solomon Hykes <[email protected]>
Regenerate GraphQL reference docs and SDK clients after moving synthetic workspace construction to Directory.asWorkspace and GitRepository.asWorkspace.

Generated with:

    dagger --x-release=v0.21.4 generate -y

This matches the Dagger version used by CI for generation.

Signed-off-by: Solomon Hykes <[email protected]>
@tiborvass
tiborvass force-pushed the codex/synthetic-workspace-workspace branch from e25915c to 63210c1 Compare June 5, 2026 01:08
@tiborvass
tiborvass merged commit 64eba3f into 1.0-beta Jun 5, 2026
76 checks passed
@tiborvass
tiborvass deleted the codex/synthetic-workspace-workspace branch June 5, 2026 01:28
tiborvass added a commit that referenced this pull request Jun 5, 2026
…ash in fd0021b

This merge commit restores the history link between 1.0-beta branch and main.
It was lost with merge commit fd0021b which
squashed the branch e45e7e4

Git tree on #13327 before squash-merging into 1.0-beta:

```
* e45e7e4 Run dagger generate
*   a01677a Merge main into 1.0-beta
|\
| * 1588421 chore: update daggerverse from 0.21.0 to 0.21.4 (#13328)
| * 20b2554 Simplify function call return handling (#13319)
| * 316ca15 Fix snapshot owner lease attach/remove race (#13321)
| * 6cfdcb4 fix(layercopy): follow source symlinks when copying directory contents (#13326)
| * 16e85ca Container exists expand option (#13310)
| * 54f9811 chore: post-release during v0.21.4 (#13316)
| * de85595 ci: bump default engine version to v0.21.3 (#13315)
| * 81bb907 chore: prep for v0.21.4 (#13314)
| * 0fd148e Show root usage when dagger has no args
| * 219b696 Volatile vars (#13223)
| * fae340c fix(layercopy): materialize resolved parent dirs when writing through… (#13308)
| * b720144 bump dang (#13306)
| * 41a7910 fix(engine): lease parent layer content for tarball export (#13307)
| * b2d43ba fix(core): attach never-cached module function results (#13298)
| * 6a7b3a7 fix incorrect artifact caching issue when releasing  (#13285)
| * 2452472 fix(core/dotenv): accept `export`-prefixed lines in .env files (#13293)
| * 24b06e7 fix: allow empty setSecret name (#13304)
| * f7ea195 fix: handle 1Password secrets with spaces (#13297)
* | 74e1a66 another pass on docs (#13325)
...
|/
* 8cc840f fix(sdk/typescript): resolve referenced values in decorator arguments (#13292)
```

Ran `git merge -s ours 1588421` on 1.0-beta to get this desired git tree:

```
*   ??gitsha?? [1.0-beta] restore merge history with main@15884210ff lost due to squash in fd0021b
|\
| * 1588421 chore: update daggerverse from 0.21.0 to 0.21.4 (#13328)
| ...
* | 94ebacb (origin/1.0-beta) update sdk docs, type-system docs, and interfaces (#13338)
* | 64eba3f (tag: v1.0.0-beta.3) [1.0-beta] feat: support synthetic workspaces (#13217)
* | fd0021b Merge main into 1.0-beta (#13327)
* | c6dd435 fix(cli): refine cloud check replay
```
tiborvass added a commit that referenced this pull request Jun 6, 2026
…ash in fd0021b

This merge commit restores the history link between 1.0-beta branch and main.
It was lost with merge commit fd0021b which
squashed the branch e45e7e4

Git tree on #13327 before squash-merging into 1.0-beta:

```
* e45e7e4 Run dagger generate
*   a01677a Merge main into 1.0-beta
|\
| * 1588421 chore: update daggerverse from 0.21.0 to 0.21.4 (#13328)
| * 20b2554 Simplify function call return handling (#13319)
| * 316ca15 Fix snapshot owner lease attach/remove race (#13321)
| * 6cfdcb4 fix(layercopy): follow source symlinks when copying directory contents (#13326)
| * 16e85ca Container exists expand option (#13310)
| * 54f9811 chore: post-release during v0.21.4 (#13316)
| * de85595 ci: bump default engine version to v0.21.3 (#13315)
| * 81bb907 chore: prep for v0.21.4 (#13314)
| * 0fd148e Show root usage when dagger has no args
| * 219b696 Volatile vars (#13223)
| * fae340c fix(layercopy): materialize resolved parent dirs when writing through… (#13308)
| * b720144 bump dang (#13306)
| * 41a7910 fix(engine): lease parent layer content for tarball export (#13307)
| * b2d43ba fix(core): attach never-cached module function results (#13298)
| * 6a7b3a7 fix incorrect artifact caching issue when releasing  (#13285)
| * 2452472 fix(core/dotenv): accept `export`-prefixed lines in .env files (#13293)
| * 24b06e7 fix: allow empty setSecret name (#13304)
| * f7ea195 fix: handle 1Password secrets with spaces (#13297)
* | 74e1a66 another pass on docs (#13325)
...
|/
* 8cc840f fix(sdk/typescript): resolve referenced values in decorator arguments (#13292)
```

Ran `git merge -s ours 1588421` on 1.0-beta to get this desired git tree:

```
*   ??gitsha?? [1.0-beta] restore merge history with main@15884210ff lost due to squash in fd0021b
|\
| * 1588421 chore: update daggerverse from 0.21.0 to 0.21.4 (#13328)
| ...
* | 94ebacb update sdk docs, type-system docs, and interfaces (#13338)
* | 64eba3f [1.0-beta] feat: support synthetic workspaces (#13217)
* | fd0021b Merge main into 1.0-beta (#13327)
* | c6dd435 fix(cli): refine cloud check replay
* | 74e1a66 another pass on docs (#13325)
```
dagger-codex Bot pushed a commit that referenced this pull request Jun 6, 2026
Conflict resolution details with original conflict hunks and resolved hunks.

1. Module workspace config fields

Related PRs: beta #13300, main #13329.

Original conflict: main added legacy argument customizations to `Module`, while beta renamed and documented workspace settings from `dagger.toml`.

```diff
diff --cc core/module.go
@@
        LegacyDefaultPath bool

+       // LegacyArgCustomizations are workspace dagger.json argument customizations
+       // applied through asModule.
+       LegacyArgCustomizations []*modules.ModuleConfigArgument
+
-       // Config values from workspace config.toml [modules.<name>.config].
+       // Workspace setting values from dagger.toml [modules.<name>.settings].
        // Typed map: strings, bools, ints, floats as-is from TOML.
        // When set, constructor args are resolved from this map first.
        WorkspaceConfig map[string]any
```

Resolution: keep both fields. Main's `LegacyArgCustomizations` is still used by merged `modulesource.go`, and beta's `WorkspaceConfig` comment reflects the current 1.0-beta `dagger.toml` settings model.

```diff
diff --git a/core/module.go b/core/module.go
@@
        LegacyDefaultPath bool

        // LegacyArgCustomizations are workspace dagger.json argument customizations
        // applied through asModule.
        LegacyArgCustomizations []*modules.ModuleConfigArgument

        // Workspace setting values from dagger.toml [modules.<name>.settings].
        // Typed map: strings, bools, ints, floats as-is from TOML.
        // When set, constructor args are resolved from this map first.
        WorkspaceConfig map[string]any
```

2. Dang API rename vs beta closure fix

Related PRs: beta #13296, main #13318.

Original conflict: main upgraded Dang and renamed class APIs to object APIs; beta used the constructor closure to preserve imports in rehydrated method calls.

```diff
diff --cc core/sdk/dang_helpers.go
@@
        parentConstructor := parentModBase.(*dang.ConstructorFunction)
+<<<<<<< HEAD
+       parentModType := parentConstructor.ClassType
+       // Use the class file's captured env so rehydrated method calls keep the
+       // imports that were in scope when the type was declared.
+       parentClosure := parentConstructor.Closure
+=======
+       parentModType := parentConstructor.ObjectType
+>>>>>>> origin/main
@@
+<<<<<<< HEAD
+       bodyEnv := dang.CreateCompositeEnv(parentModEnv, parentClosure)
+=======
+       bodyEnv := dang.CreateOverlayValueScope(parentModEnv, env)
+>>>>>>> origin/main
        bodyEnv.EnterSelf(parentModEnv)
-       _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ClassBodyForms, bodyEnv)
+       _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ObjectBodyForms, bodyEnv)
```

Resolution: take main's newer Dang API names, but keep beta's captured `Closure` for conversion and body evaluation.

```diff
diff --git a/core/sdk/dang_helpers.go b/core/sdk/dang_helpers.go
@@
        parentConstructor := parentModBase.(*dang.ConstructorFunction)
        parentModType := parentConstructor.ObjectType
        // Use the class file's captured env so rehydrated method calls keep the
        // imports that were in scope when the type was declared.
        parentClosure := parentConstructor.Closure
@@
        bodyEnv := dang.CreateOverlayValueScope(parentModEnv, parentClosure)
        bodyEnv.EnterSelf(parentModEnv)
        _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ObjectBodyForms, bodyEnv)
```

3. Current docs promotion vs beta current-docs surface

Related PRs: beta #13338, main #13345.

Original conflict: main promoted 1.0-beta docs into `current_docs`, while beta already had the active 1.0-beta current-docs surface with beta links and `dagger.toml` workspace wording.

```diff
diff --cc docs/current_docs/adopting/workspace-setup.mdx
@@
+<<<<<<< HEAD
+You've seen Dagger work on [hello-dagger](/quickstart). Now set it up on your own project.
+=======
+You've seen Dagger work on [hello-dagger](../getting-started/quickstart.mdx). Now set it up on your own project.
+>>>>>>> origin/main
@@
+<<<<<<< HEAD
+`dagger mod install` creates a workspace configuration (`dagger.toml`) if needed and adds the selected module.
+=======
+`dagger mod install` creates a workspace configuration (`.dagger/config.toml`) if needed and adds the selected module.
+>>>>>>> origin/main
```

Resolution: keep the previously resolved beta/current-docs tree for `docs/current_docs` and `docs/sidebars.ts`. That preserves the current 1.0-beta links, aliases, and `dagger.toml` terminology while still accepting main's non-current docs payload.

```diff
diff --git a/docs/current_docs/adopting/workspace-setup.mdx b/docs/current_docs/adopting/workspace-setup.mdx
@@
 You've seen Dagger work on [hello-dagger](/quickstart). Now set it up on your own project.
@@
 `dagger mod install` creates a workspace configuration (`dagger.toml`) if needed and adds the selected module.
```

4. Versioned docs archive vs beta docs deletions and test-fixture moves

Related PRs: beta #13217 and #13338, main #13345.

Original conflict: main archived old current docs under `docs/versioned_docs`, while beta had deleted those old current-docs pages or moved some snippets into integration test fixtures.

```diff
diff --cc docs/current_docs/getting-started/ci-integrations/github-actions.mdx
@@
+<<<<<<< HEAD
+deleted in 1.0-beta current docs
+=======
+renamed to docs/versioned_docs/version-0.21.4/getting-started/ci-integrations/github-actions.mdx
+>>>>>>> origin/main

diff --cc docs/current_docs/cookbook/snippets/secret-variable/java/.gitignore
@@
+<<<<<<< HEAD
+renamed to core/integration/testdata/modules/java/path-context-git-04/.gitignore
+=======
+renamed to docs/versioned_docs/version-0.16.3/api/snippets/functions/arguments-array/java/.gitignore
+>>>>>>> origin/main
```

Resolution: keep beta's current-docs deletions and integration test fixture moves, and keep main's versioned docs/archive files under `docs/versioned_docs`.

```diff
diff --git a/core/integration/testdata/modules/java/path-context-git-04/.gitignore b/core/integration/testdata/modules/java/path-context-git-04/.gitignore
@@
+# beta integration fixture path remains

diff --git a/docs/versioned_docs/version-0.21.4/getting-started/ci-integrations/github-actions.mdx b/docs/versioned_docs/version-0.21.4/getting-started/ci-integrations/github-actions.mdx
@@
+# main versioned docs archive path remains
```

## Notes

- No separate `dagger generate -y` commit was added for this fresh merge. Current `origin/main` already includes the generated outputs that should be represented by the merge tree.

Signed-off-by: Solomon Hykes <[email protected]>
@dagger-codex

dagger-codex Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up implementation PR opened: #13347

This carries the private source-backed synthetic workspace implementation on top of 1.0-beta: clientLocal, directory, gitRef, and overlay sources; Directory.asWorkspace; GitRef.asWorkspace; overlay workspace writes; git-ref-backed workspace.git(); and schema privacy for backend/source/session details.

dagger-codex Bot pushed a commit that referenced this pull request Jun 8, 2026
Merges `main` into `1.0-beta`, resolving conflicts from the docs restructure/versioning work, the Dang API bump, and workspace/module config changes.

Grouped sections below are explicit groupings: hunks are grouped only when they come from the same conflicting PRs and use the same resolution rule. Each grouped section includes example hunks so the resolution rule is visible.

## Docs conflicts

### `docs/current_docs/` and `docs/sidebars.ts`

Related PRs: beta #13338, main #13345.

This is a grouped conflict category. Main #13345 promoted the 1.0-beta docs into `current_docs`, while beta #13338 already had the active 1.0-beta current-docs surface. I kept the beta/current-docs surface for `docs/current_docs` and `docs/sidebars.ts`, including beta route aliases and `dagger.toml` terminology. Main's promoted docs payload is still accepted outside this current-docs surface as versioned/static docs.

Example hunk 1: workspace setup keeps beta's current route and `dagger.toml` wording instead of main's relative link and `.dagger/config.toml` wording.

```diff
diff --cc docs/current_docs/adopting/workspace-setup.mdx
@@
+<<<<<<< HEAD
+You've seen Dagger work on [hello-dagger](/quickstart). Now set it up on your own project.
+=======
+You've seen Dagger work on [hello-dagger](../getting-started/quickstart.mdx). Now set it up on your own project.
+>>>>>>> origin/main
@@
+<<<<<<< HEAD
+`dagger mod install` creates a workspace configuration (`dagger.toml`) if needed and adds the selected module.
+=======
+`dagger mod install` creates a workspace configuration (`.dagger/config.toml`) if needed and adds the selected module.
+>>>>>>> origin/main
```

Resolved:

```diff
diff --git a/docs/current_docs/adopting/workspace-setup.mdx b/docs/current_docs/adopting/workspace-setup.mdx
@@
 You've seen Dagger work on [hello-dagger](/quickstart). Now set it up on your own project.
@@
 `dagger mod install` creates a workspace configuration (`dagger.toml`) if needed and adds the selected module.
```

Example hunk 2: Argo Workflows follows the same current-docs rule, keeping beta's current aliases and `dagger.toml` terminology instead of main's promoted relative links and old workspace config path.

```diff
diff --cc docs/current_docs/adopting/triggers/argo-workflows.mdx
@@
+<<<<<<< HEAD
+For checks with no workflow YAML at all, enable [Cloud Checks](/adopting/triggers) with `dagger ws autocheck on`.
+=======
+For checks with no workflow YAML at all, enable [Cloud Checks](./index.mdx) with `dagger ws autocheck on`.
+>>>>>>> origin/main
@@
+<<<<<<< HEAD
+- A repository with a Dagger workspace (`dagger.toml`) — see [Workspace Setup](/adopting/workspace-setup)
+=======
+- A repository with a Dagger workspace (`.dagger/config.toml`) — see [Workspace Setup](../workspace-setup.mdx)
+>>>>>>> origin/main
```

Resolved:

```diff
diff --git a/docs/current_docs/adopting/triggers/argo-workflows.mdx b/docs/current_docs/adopting/triggers/argo-workflows.mdx
@@
 For checks with no workflow YAML at all, enable [Cloud Checks](/adopting/triggers) with `dagger ws autocheck on`.
@@
 - A repository with a Dagger workspace (`dagger.toml`) — see [Workspace Setup](/adopting/workspace-setup)
```

### `docs/versioned_docs/` archive

Related PRs: beta #13338, main #13345.

This is a grouped conflict category. Main #13345 archived old docs under `docs/versioned_docs`, while beta #13338 removed old pages from the active current-docs tree. I kept beta's current-doc deletions and kept main's archive files under `docs/versioned_docs`; those are different final destinations, so both sides are represented without resurrecting old pages under `docs/current_docs`.

Example hunk:

```diff
diff --cc docs/current_docs/getting-started/ci-integrations/github-actions.mdx
@@
+<<<<<<< HEAD
+deleted in 1.0-beta current docs
+=======
+renamed to docs/versioned_docs/version-0.21.4/getting-started/ci-integrations/github-actions.mdx
+>>>>>>> origin/main
```

Resolved:

```diff
diff --git a/docs/versioned_docs/version-0.21.4/getting-started/ci-integrations/github-actions.mdx b/docs/versioned_docs/version-0.21.4/getting-started/ci-integrations/github-actions.mdx
@@
+# main versioned docs archive path remains
```

## Code conflicts

### `core/sdk/dang_helpers.go`

Related PRs: beta #13296, main #13318.

Main upgraded Dang and renamed class APIs to object APIs. Beta fixed rehydrated method calls by preserving the constructor closure so imports remain in scope. I used main's newer Dang API names and kept beta's captured `Closure` behavior.

```diff
diff --cc core/sdk/dang_helpers.go
@@
        parentConstructor := parentModBase.(*dang.ConstructorFunction)
+<<<<<<< HEAD
+       parentModType := parentConstructor.ClassType
+       // Use the class file's captured env so rehydrated method calls keep the
+       // imports that were in scope when the type was declared.
+       parentClosure := parentConstructor.Closure
+=======
+       parentModType := parentConstructor.ObjectType
+>>>>>>> origin/main
@@
+<<<<<<< HEAD
+       bodyEnv := dang.CreateCompositeEnv(parentModEnv, parentClosure)
+=======
+       bodyEnv := dang.CreateOverlayValueScope(parentModEnv, env)
+>>>>>>> origin/main
        bodyEnv.EnterSelf(parentModEnv)
-       _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ClassBodyForms, bodyEnv)
+       _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ObjectBodyForms, bodyEnv)
```

Resolved:

```diff
diff --git a/core/sdk/dang_helpers.go b/core/sdk/dang_helpers.go
@@
        parentConstructor := parentModBase.(*dang.ConstructorFunction)
        parentModType := parentConstructor.ObjectType
        // Use the class file's captured env so rehydrated method calls keep the
        // imports that were in scope when the type was declared.
        parentClosure := parentConstructor.Closure
@@
        bodyEnv := dang.CreateOverlayValueScope(parentModEnv, parentClosure)
        bodyEnv.EnterSelf(parentModEnv)
        _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ObjectBodyForms, bodyEnv)
```

### `core/module.go`

Related PRs: beta #13300, main #13329.

Main added `LegacyArgCustomizations`, which is used by merged `modulesource.go` code. Beta renamed workspace configuration terminology for `dagger.toml` settings. I kept both the new field and beta's settings terminology.

```diff
diff --cc core/module.go
@@
        LegacyDefaultPath bool

+       // LegacyArgCustomizations are workspace dagger.json argument customizations
+       // applied through asModule.
+       LegacyArgCustomizations []*modules.ModuleConfigArgument
+
-       // Config values from workspace config.toml [modules.<name>.config].
+       // Workspace setting values from dagger.toml [modules.<name>.settings].
        // Typed map: strings, bools, ints, floats as-is from TOML.
        // When set, constructor args are resolved from this map first.
        WorkspaceConfig map[string]any
```

Resolved:

```diff
diff --git a/core/module.go b/core/module.go
@@
        LegacyDefaultPath bool

        // LegacyArgCustomizations are workspace dagger.json argument customizations
        // applied through asModule.
        LegacyArgCustomizations []*modules.ModuleConfigArgument

        // Workspace setting values from dagger.toml [modules.<name>.settings].
        // Typed map: strings, bools, ints, floats as-is from TOML.
        // When set, constructor args are resolved from this map first.
        WorkspaceConfig map[string]any
```

## Test fixture conflicts

Related PRs: beta #13217, main #13345.

This is a grouped conflict category. Beta moved snippet files into integration test fixtures, while main #13345 archived the old docs snippets under `docs/versioned_docs`. I kept beta's integration fixture paths and kept main's versioned docs archive paths.

Example hunk:

```diff
diff --cc docs/current_docs/cookbook/snippets/secret-variable/java/.gitignore
@@
+<<<<<<< HEAD
+renamed to core/integration/testdata/modules/java/path-context-git-04/.gitignore
+=======
+renamed to docs/versioned_docs/version-0.16.3/api/snippets/functions/arguments-array/java/.gitignore
+>>>>>>> origin/main
```

Resolved:

```diff
diff --git a/core/integration/testdata/modules/java/path-context-git-04/.gitignore b/core/integration/testdata/modules/java/path-context-git-04/.gitignore
@@
+# beta integration fixture path remains

diff --git a/docs/versioned_docs/version-0.16.3/api/snippets/functions/arguments-array/java/.gitignore b/docs/versioned_docs/version-0.16.3/api/snippets/functions/arguments-array/java/.gitignore
@@
+# main versioned docs archive path remains
```

## Notes

- No separate `dagger generate -y` commit was added for this fresh merge. Current `origin/main` already includes the generated outputs that should be represented by the merge tree.

Signed-off-by: Solomon Hykes <[email protected]>
dagger-codex Bot pushed a commit that referenced this pull request Jun 8, 2026
Merges `main` into `1.0-beta`, resolving conflicts from the docs restructure/versioning work, the Dang API bump, and workspace/module config changes.

Grouped sections below are explicit groupings: hunks are grouped only when they come from the same conflicting PRs and use the same resolution rule. Each grouped section includes example hunks so the resolution rule is visible.

## Docs conflicts

### `docs/current_docs/` and `docs/sidebars.ts`

Related PRs: beta #13338, main #13345.

This is a grouped conflict category. Main #13345 promoted the 1.0-beta docs into `current_docs`, while beta #13338 already had the active 1.0-beta current-docs surface. I kept the beta/current-docs surface for `docs/current_docs` and `docs/sidebars.ts`, including beta route aliases and `dagger.toml` terminology. Main's promoted docs payload is still accepted outside this current-docs surface as versioned/static docs.

Example hunk 1: workspace setup keeps beta's current route and `dagger.toml` wording instead of main's relative link and `.dagger/config.toml` wording.

```diff
diff --cc docs/current_docs/adopting/workspace-setup.mdx
@@
+<<<<<<< HEAD
+You've seen Dagger work on [hello-dagger](/quickstart). Now set it up on your own project.
+=======
+You've seen Dagger work on [hello-dagger](../getting-started/quickstart.mdx). Now set it up on your own project.
+>>>>>>> origin/main
@@
+<<<<<<< HEAD
+`dagger mod install` creates a workspace configuration (`dagger.toml`) if needed and adds the selected module.
+=======
+`dagger mod install` creates a workspace configuration (`.dagger/config.toml`) if needed and adds the selected module.
+>>>>>>> origin/main
```

Resolved:

```diff
diff --git a/docs/current_docs/adopting/workspace-setup.mdx b/docs/current_docs/adopting/workspace-setup.mdx
@@
 You've seen Dagger work on [hello-dagger](/quickstart). Now set it up on your own project.
@@
 `dagger mod install` creates a workspace configuration (`dagger.toml`) if needed and adds the selected module.
```

Example hunk 2: Argo Workflows follows the same current-docs rule, keeping beta's current aliases and `dagger.toml` terminology instead of main's promoted relative links and old workspace config path.

```diff
diff --cc docs/current_docs/adopting/triggers/argo-workflows.mdx
@@
+<<<<<<< HEAD
+For checks with no workflow YAML at all, enable [Cloud Checks](/adopting/triggers) with `dagger ws autocheck on`.
+=======
+For checks with no workflow YAML at all, enable [Cloud Checks](./index.mdx) with `dagger ws autocheck on`.
+>>>>>>> origin/main
@@
+<<<<<<< HEAD
+- A repository with a Dagger workspace (`dagger.toml`) — see [Workspace Setup](/adopting/workspace-setup)
+=======
+- A repository with a Dagger workspace (`.dagger/config.toml`) — see [Workspace Setup](../workspace-setup.mdx)
+>>>>>>> origin/main
```

Resolved:

```diff
diff --git a/docs/current_docs/adopting/triggers/argo-workflows.mdx b/docs/current_docs/adopting/triggers/argo-workflows.mdx
@@
 For checks with no workflow YAML at all, enable [Cloud Checks](/adopting/triggers) with `dagger ws autocheck on`.
@@
 - A repository with a Dagger workspace (`dagger.toml`) — see [Workspace Setup](/adopting/workspace-setup)
```

### `docs/versioned_docs/` archive

Related PRs: beta #13338, main #13345.

This is a grouped conflict category. Main #13345 archived old docs under `docs/versioned_docs`, while beta #13338 removed old pages from the active current-docs tree. I kept beta's current-doc deletions and kept main's archive files under `docs/versioned_docs`; those are different final destinations, so both sides are represented without resurrecting old pages under `docs/current_docs`.

Example path conflict, not a content hunk:

- Beta removed the old live current-docs page: `docs/current_docs/getting-started/ci-integrations/github-actions.mdx`
- Main archived that old page at: `docs/versioned_docs/version-0.21.4/getting-started/ci-integrations/github-actions.mdx`

Resolution:

- keep the file removed from `docs/current_docs`
- keep main's archived copy under `docs/versioned_docs/version-0.21.4/`

No line-level content hunk was resolved for this page; the conflict was about whether the old current-docs path should remain live or only exist in the versioned archive.## Code conflicts

### `core/sdk/dang_helpers.go`

Related PRs: beta #13296, main #13318.

Main upgraded Dang and renamed class APIs to object APIs. Beta fixed rehydrated method calls by preserving the constructor closure so imports remain in scope. I used main's newer Dang API names and kept beta's captured `Closure` behavior.

```diff
diff --cc core/sdk/dang_helpers.go
@@
        parentConstructor := parentModBase.(*dang.ConstructorFunction)
+<<<<<<< HEAD
+       parentModType := parentConstructor.ClassType
+       // Use the class file's captured env so rehydrated method calls keep the
+       // imports that were in scope when the type was declared.
+       parentClosure := parentConstructor.Closure
+=======
+       parentModType := parentConstructor.ObjectType
+>>>>>>> origin/main
@@
+<<<<<<< HEAD
+       bodyEnv := dang.CreateCompositeEnv(parentModEnv, parentClosure)
+=======
+       bodyEnv := dang.CreateOverlayValueScope(parentModEnv, env)
+>>>>>>> origin/main
        bodyEnv.EnterSelf(parentModEnv)
-       _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ClassBodyForms, bodyEnv)
+       _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ObjectBodyForms, bodyEnv)
```

Resolved:

```diff
diff --git a/core/sdk/dang_helpers.go b/core/sdk/dang_helpers.go
@@
        parentConstructor := parentModBase.(*dang.ConstructorFunction)
        parentModType := parentConstructor.ObjectType
        // Use the class file's captured env so rehydrated method calls keep the
        // imports that were in scope when the type was declared.
        parentClosure := parentConstructor.Closure
@@
        bodyEnv := dang.CreateOverlayValueScope(parentModEnv, parentClosure)
        bodyEnv.EnterSelf(parentModEnv)
        _, err = dang.EvaluateFormsWithPhases(ctx, parentConstructor.ObjectBodyForms, bodyEnv)
```

### `core/module.go`

Related PRs: beta #13300, main #13329.

Main added `LegacyArgCustomizations`, which is used by merged `modulesource.go` code. Beta renamed workspace configuration terminology for `dagger.toml` settings. I kept both the new field and beta's settings terminology.

```diff
diff --cc core/module.go
@@
        LegacyDefaultPath bool

+       // LegacyArgCustomizations are workspace dagger.json argument customizations
+       // applied through asModule.
+       LegacyArgCustomizations []*modules.ModuleConfigArgument
+
-       // Config values from workspace config.toml [modules.<name>.config].
+       // Workspace setting values from dagger.toml [modules.<name>.settings].
        // Typed map: strings, bools, ints, floats as-is from TOML.
        // When set, constructor args are resolved from this map first.
        WorkspaceConfig map[string]any
```

Resolved:

```diff
diff --git a/core/module.go b/core/module.go
@@
        LegacyDefaultPath bool

        // LegacyArgCustomizations are workspace dagger.json argument customizations
        // applied through asModule.
        LegacyArgCustomizations []*modules.ModuleConfigArgument

        // Workspace setting values from dagger.toml [modules.<name>.settings].
        // Typed map: strings, bools, ints, floats as-is from TOML.
        // When set, constructor args are resolved from this map first.
        WorkspaceConfig map[string]any
```

## Test fixture conflicts

Related PRs: beta #13217, main #13345.

This is a grouped conflict category. Beta moved snippet files into integration test fixtures, while main #13345 archived the old docs snippets under `docs/versioned_docs`. These are path conflicts, not line-level content hunks. I kept beta's integration fixture paths and kept main's versioned docs archive paths.

Example path conflict, not a content hunk:

- Beta moved the old docs snippet into an integration fixture path: `core/integration/testdata/modules/java/path-context-git-04/.gitignore`
- Main archived that old docs snippet at: `docs/versioned_docs/version-0.16.3/api/snippets/functions/arguments-array/java/.gitignore`
- The old live docs path was: `docs/current_docs/cookbook/snippets/secret-variable/java/.gitignore`

Resolution:

- keep beta's integration fixture file
- keep main's versioned docs archive file
- do not restore the old live `docs/current_docs` snippet path

No line-level content hunk was resolved for this example; the conflict was about preserving the right final paths on both sides.

## Notes

- No separate `dagger generate -y` commit was added for this fresh merge. Current `origin/main` already includes the generated outputs that should be represented by the merge tree.

Signed-off-by: Solomon Hykes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants