Repository navigation
local: fix when include is not specified - #127
Merged
Merged
Conversation
Signed-off-by: Andrea Luzzardi <[email protected]>
aluzzardi
pushed a commit
that referenced
this pull request
Sep 16, 2022
loosen TS configuration + target an older javascript language
shykes
added a commit
that referenced
this pull request
Jun 12, 2026
A first-class group for SDK management, alongside `api`, `module`, `cloud`, `workspace` in the toolbox row of `dagger --help`. Workshopped against the alternatives `dagger install <ref> --as-sdk` and folding everything under `dagger module`; `sdk` won on four points: room to grow as a namespace (install / uninstall / list / search / module-options / client-options), built-in disambiguation (`dagger sdk install go` is unambiguous where `dagger install go` would force a `-sdk` suffix or sdks.json hijacking of the install verb), shorter than `--as-sdk` to type, and surfaces SDKs as a first-class concept in `--help`. Semantic split with the `module` group: SDK is the tool, module is the thing the SDK creates. `dagger sdk install` adds the SDK and marks it; `dagger module init <sdk> <name>` uses an installed SDK to create a module (positional dispatch — the typed init shape lands with task #127). Subcommands: - `install <name-or-ref>` — resolves through the embedded sdks.json registry (`go` → github.com/dagger/go-sdk), installs the module, and writes the empty `[modules.<name>.as-sdk]` marker. Workspace install name is the alias you typed (`go`), not the basename of the canonical ref (`go-sdk`) — short, and what muscle memory expects. Direct refs work too: `dagger sdk install github.com/foo/sdk` lands as `[modules.sdk]` by basename. Generic `dagger install <ref>` does NOT mark anything as an SDK; the marker is opt-in via this verb. - `uninstall <name>` — refuse-if-authored: errors when the SDK has entries under `[[modules.<name>.as-sdk.modules]]` or `[[modules.<name>.as-sdk.clients]]`. The check is CLI-side against the on-disk config — no session bootstrap to read TOML, and it has to happen before we dispatch the uninstall mutation. `--force` overrides; files on disk are left untouched, only the workspace entries go away. - `list` — reads `dagger.toml`, prints installs where `AsSDK != nil` with NAME / SOURCE / M / C columns (M = authored modules, C = generated clients). Cheap capability affordance until per-SDK introspection lands with task #129. - `search [query]` — lists embedded `sdks.json` entries. Substring match on name / alias / repo. No query = print all. - `module-options <sdk>` / `client-options <sdk>` — stubbed with a clear "not yet wired (pending SDK contract, task #129)" message rather than fabricating a flag list. They do validate that the named install exists *and* carries the as-sdk marker, so the user gets the useful "run `dagger sdk install <sdk>` first" hint when the install is missing. Engine: `Workspace.install` grows an `asSdk: Boolean = false` arg. When true and the install is fresh, the entry is created with `AsSDK: &workspace.ModuleAsSDK{}` (the empty marker). When the install is idempotent (same `name`/`source` already present), the marker is stamped onto the existing entry if missing — so a plain `dagger install go-sdk` followed by `dagger sdk install go-sdk` upgrades it in place rather than erroring. Workspace flag policy on install/uninstall: `local-only`, matching the generic install / uninstall verbs. Remote refs can't sneak in through `--workspace` and mutate someone else's config. CLI side calls `Workspace.install` with `asSdk: true` via raw GraphQL (`dag.Do`) until the Go SDK regenerates against the new schema — same pattern as `Workspace.moduleInit` already uses on this branch. Tests updated: `sdk` appears in the root-help Contains set and in the leaf-vs-parent ordering check. Future doc + PR description update in a follow-up commit.
eunomie
pushed a commit
to eunomie/dagger
that referenced
this pull request
Jun 16, 2026
A first-class group for SDK management, alongside `api`, `module`, `cloud`, `workspace` in the toolbox row of `dagger --help`. Workshopped against the alternatives `dagger install <ref> --as-sdk` and folding everything under `dagger module`; `sdk` won on four points: room to grow as a namespace (install / uninstall / list / search / module-options / client-options), built-in disambiguation (`dagger sdk install go` is unambiguous where `dagger install go` would force a `-sdk` suffix or sdks.json hijacking of the install verb), shorter than `--as-sdk` to type, and surfaces SDKs as a first-class concept in `--help`. Semantic split with the `module` group: SDK is the tool, module is the thing the SDK creates. `dagger sdk install` adds the SDK and marks it; `dagger module init <sdk> <name>` uses an installed SDK to create a module (positional dispatch — the typed init shape lands with task dagger#127). Subcommands: - `install <name-or-ref>` — resolves through the embedded sdks.json registry (`go` → github.com/dagger/go-sdk), installs the module, and writes the empty `[modules.<name>.as-sdk]` marker. Workspace install name is the alias you typed (`go`), not the basename of the canonical ref (`go-sdk`) — short, and what muscle memory expects. Direct refs work too: `dagger sdk install github.com/foo/sdk` lands as `[modules.sdk]` by basename. Generic `dagger install <ref>` does NOT mark anything as an SDK; the marker is opt-in via this verb. - `uninstall <name>` — refuse-if-authored: errors when the SDK has entries under `[[modules.<name>.as-sdk.modules]]` or `[[modules.<name>.as-sdk.clients]]`. The check is CLI-side against the on-disk config — no session bootstrap to read TOML, and it has to happen before we dispatch the uninstall mutation. `--force` overrides; files on disk are left untouched, only the workspace entries go away. - `list` — reads `dagger.toml`, prints installs where `AsSDK != nil` with NAME / SOURCE / M / C columns (M = authored modules, C = generated clients). Cheap capability affordance until per-SDK introspection lands with task dagger#129. - `search [query]` — lists embedded `sdks.json` entries. Substring match on name / alias / repo. No query = print all. - `module-options <sdk>` / `client-options <sdk>` — stubbed with a clear "not yet wired (pending SDK contract, task dagger#129)" message rather than fabricating a flag list. They do validate that the named install exists *and* carries the as-sdk marker, so the user gets the useful "run `dagger sdk install <sdk>` first" hint when the install is missing. Engine: `Workspace.install` grows an `asSdk: Boolean = false` arg. When true and the install is fresh, the entry is created with `AsSDK: &workspace.ModuleAsSDK{}` (the empty marker). When the install is idempotent (same `name`/`source` already present), the marker is stamped onto the existing entry if missing — so a plain `dagger install go-sdk` followed by `dagger sdk install go-sdk` upgrades it in place rather than erroring. Workspace flag policy on install/uninstall: `local-only`, matching the generic install / uninstall verbs. Remote refs can't sneak in through `--workspace` and mutate someone else's config. CLI side calls `Workspace.install` with `asSdk: true` via raw GraphQL (`dag.Do`) until the Go SDK regenerates against the new schema — same pattern as `Workspace.moduleInit` already uses on this branch. Tests updated: `sdk` appears in the root-help Contains set and in the leaf-vs-parent ordering check. Future doc + PR description update in a follow-up commit. Signed-off-by: Solomon Hykes <[email protected]>
eunomie
pushed a commit
to eunomie/dagger
that referenced
this pull request
Jun 16, 2026
A first-class group for SDK management, alongside `api`, `module`, `cloud`, `workspace` in the toolbox row of `dagger --help`. Workshopped against the alternatives `dagger install <ref> --as-sdk` and folding everything under `dagger module`; `sdk` won on four points: room to grow as a namespace (install / uninstall / list / search / module-options / client-options), built-in disambiguation (`dagger sdk install go` is unambiguous where `dagger install go` would force a `-sdk` suffix or sdks.json hijacking of the install verb), shorter than `--as-sdk` to type, and surfaces SDKs as a first-class concept in `--help`. Semantic split with the `module` group: SDK is the tool, module is the thing the SDK creates. `dagger sdk install` adds the SDK and marks it; `dagger module init <sdk> <name>` uses an installed SDK to create a module (positional dispatch — the typed init shape lands with task dagger#127). Subcommands: - `install <name-or-ref>` — resolves through the embedded sdks.json registry (`go` → github.com/dagger/go-sdk), installs the module, and writes the empty `[modules.<name>.as-sdk]` marker. Workspace install name is the alias you typed (`go`), not the basename of the canonical ref (`go-sdk`) — short, and what muscle memory expects. Direct refs work too: `dagger sdk install github.com/foo/sdk` lands as `[modules.sdk]` by basename. Generic `dagger install <ref>` does NOT mark anything as an SDK; the marker is opt-in via this verb. - `uninstall <name>` — refuse-if-authored: errors when the SDK has entries under `[[modules.<name>.as-sdk.modules]]` or `[[modules.<name>.as-sdk.clients]]`. The check is CLI-side against the on-disk config — no session bootstrap to read TOML, and it has to happen before we dispatch the uninstall mutation. `--force` overrides; files on disk are left untouched, only the workspace entries go away. - `list` — reads `dagger.toml`, prints installs where `AsSDK != nil` with NAME / SOURCE / M / C columns (M = authored modules, C = generated clients). Cheap capability affordance until per-SDK introspection lands with task dagger#129. - `search [query]` — lists embedded `sdks.json` entries. Substring match on name / alias / repo. No query = print all. - `module-options <sdk>` / `client-options <sdk>` — stubbed with a clear "not yet wired (pending SDK contract, task dagger#129)" message rather than fabricating a flag list. They do validate that the named install exists *and* carries the as-sdk marker, so the user gets the useful "run `dagger sdk install <sdk>` first" hint when the install is missing. Engine: `Workspace.install` grows an `asSdk: Boolean = false` arg. When true and the install is fresh, the entry is created with `AsSDK: &workspace.ModuleAsSDK{}` (the empty marker). When the install is idempotent (same `name`/`source` already present), the marker is stamped onto the existing entry if missing — so a plain `dagger install go-sdk` followed by `dagger sdk install go-sdk` upgrades it in place rather than erroring. Workspace flag policy on install/uninstall: `local-only`, matching the generic install / uninstall verbs. Remote refs can't sneak in through `--workspace` and mutate someone else's config. CLI side calls `Workspace.install` with `asSdk: true` via raw GraphQL (`dag.Do`) until the Go SDK regenerates against the new schema — same pattern as `Workspace.moduleInit` already uses on this branch. Tests updated: `sdk` appears in the root-help Contains set and in the leaf-vs-parent ordering check. Future doc + PR description update in a follow-up commit. Signed-off-by: Solomon Hykes <[email protected]>
eunomie
pushed a commit
that referenced
this pull request
Jun 17, 2026
A first-class group for SDK management, alongside `api`, `module`, `cloud`, `workspace` in the toolbox row of `dagger --help`. Workshopped against the alternatives `dagger install <ref> --as-sdk` and folding everything under `dagger module`; `sdk` won on four points: room to grow as a namespace (install / uninstall / list / search / module-options / client-options), built-in disambiguation (`dagger sdk install go` is unambiguous where `dagger install go` would force a `-sdk` suffix or sdks.json hijacking of the install verb), shorter than `--as-sdk` to type, and surfaces SDKs as a first-class concept in `--help`. Semantic split with the `module` group: SDK is the tool, module is the thing the SDK creates. `dagger sdk install` adds the SDK and marks it; `dagger module init <sdk> <name>` uses an installed SDK to create a module (positional dispatch — the typed init shape lands with task #127). Subcommands: - `install <name-or-ref>` — resolves through the embedded sdks.json registry (`go` → github.com/dagger/go-sdk), installs the module, and writes the empty `[modules.<name>.as-sdk]` marker. Workspace install name is the alias you typed (`go`), not the basename of the canonical ref (`go-sdk`) — short, and what muscle memory expects. Direct refs work too: `dagger sdk install github.com/foo/sdk` lands as `[modules.sdk]` by basename. Generic `dagger install <ref>` does NOT mark anything as an SDK; the marker is opt-in via this verb. - `uninstall <name>` — refuse-if-authored: errors when the SDK has entries under `[[modules.<name>.as-sdk.modules]]` or `[[modules.<name>.as-sdk.clients]]`. The check is CLI-side against the on-disk config — no session bootstrap to read TOML, and it has to happen before we dispatch the uninstall mutation. `--force` overrides; files on disk are left untouched, only the workspace entries go away. - `list` — reads `dagger.toml`, prints installs where `AsSDK != nil` with NAME / SOURCE / M / C columns (M = authored modules, C = generated clients). Cheap capability affordance until per-SDK introspection lands with task #129. - `search [query]` — lists embedded `sdks.json` entries. Substring match on name / alias / repo. No query = print all. - `module-options <sdk>` / `client-options <sdk>` — stubbed with a clear "not yet wired (pending SDK contract, task #129)" message rather than fabricating a flag list. They do validate that the named install exists *and* carries the as-sdk marker, so the user gets the useful "run `dagger sdk install <sdk>` first" hint when the install is missing. Engine: `Workspace.install` grows an `asSdk: Boolean = false` arg. When true and the install is fresh, the entry is created with `AsSDK: &workspace.ModuleAsSDK{}` (the empty marker). When the install is idempotent (same `name`/`source` already present), the marker is stamped onto the existing entry if missing — so a plain `dagger install go-sdk` followed by `dagger sdk install go-sdk` upgrades it in place rather than erroring. Workspace flag policy on install/uninstall: `local-only`, matching the generic install / uninstall verbs. Remote refs can't sneak in through `--workspace` and mutate someone else's config. CLI side calls `Workspace.install` with `asSdk: true` via raw GraphQL (`dag.Do`) until the Go SDK regenerates against the new schema — same pattern as `Workspace.moduleInit` already uses on this branch. Tests updated: `sdk` appears in the root-help Contains set and in the leaf-vs-parent ordering check. Future doc + PR description update in a follow-up commit. Signed-off-by: Solomon Hykes <[email protected]>
eunomie
pushed a commit
that referenced
this pull request
Jun 18, 2026
A first-class group for SDK management, alongside `api`, `module`, `cloud`, `workspace` in the toolbox row of `dagger --help`. Workshopped against the alternatives `dagger install <ref> --as-sdk` and folding everything under `dagger module`; `sdk` won on four points: room to grow as a namespace (install / uninstall / list / search / module-options / client-options), built-in disambiguation (`dagger sdk install go` is unambiguous where `dagger install go` would force a `-sdk` suffix or sdks.json hijacking of the install verb), shorter than `--as-sdk` to type, and surfaces SDKs as a first-class concept in `--help`. Semantic split with the `module` group: SDK is the tool, module is the thing the SDK creates. `dagger sdk install` adds the SDK and marks it; `dagger module init <sdk> <name>` uses an installed SDK to create a module (positional dispatch — the typed init shape lands with task #127). Subcommands: - `install <name-or-ref>` — resolves through the embedded sdks.json registry (`go` → github.com/dagger/go-sdk), installs the module, and writes the empty `[modules.<name>.as-sdk]` marker. Workspace install name is the alias you typed (`go`), not the basename of the canonical ref (`go-sdk`) — short, and what muscle memory expects. Direct refs work too: `dagger sdk install github.com/foo/sdk` lands as `[modules.sdk]` by basename. Generic `dagger install <ref>` does NOT mark anything as an SDK; the marker is opt-in via this verb. - `uninstall <name>` — refuse-if-authored: errors when the SDK has entries under `[[modules.<name>.as-sdk.modules]]` or `[[modules.<name>.as-sdk.clients]]`. The check is CLI-side against the on-disk config — no session bootstrap to read TOML, and it has to happen before we dispatch the uninstall mutation. `--force` overrides; files on disk are left untouched, only the workspace entries go away. - `list` — reads `dagger.toml`, prints installs where `AsSDK != nil` with NAME / SOURCE / M / C columns (M = authored modules, C = generated clients). Cheap capability affordance until per-SDK introspection lands with task #129. - `search [query]` — lists embedded `sdks.json` entries. Substring match on name / alias / repo. No query = print all. - `module-options <sdk>` / `client-options <sdk>` — stubbed with a clear "not yet wired (pending SDK contract, task #129)" message rather than fabricating a flag list. They do validate that the named install exists *and* carries the as-sdk marker, so the user gets the useful "run `dagger sdk install <sdk>` first" hint when the install is missing. Engine: `Workspace.install` grows an `asSdk: Boolean = false` arg. When true and the install is fresh, the entry is created with `AsSDK: &workspace.ModuleAsSDK{}` (the empty marker). When the install is idempotent (same `name`/`source` already present), the marker is stamped onto the existing entry if missing — so a plain `dagger install go-sdk` followed by `dagger sdk install go-sdk` upgrades it in place rather than erroring. Workspace flag policy on install/uninstall: `local-only`, matching the generic install / uninstall verbs. Remote refs can't sneak in through `--workspace` and mutate someone else's config. CLI side calls `Workspace.install` with `asSdk: true` via raw GraphQL (`dag.Do`) until the Go SDK regenerates against the new schema — same pattern as `Workspace.moduleInit` already uses on this branch. Tests updated: `sdk` appears in the root-help Contains set and in the leaf-vs-parent ordering check. Future doc + PR description update in a follow-up commit. Signed-off-by: Solomon Hykes <[email protected]>
tiborvass
pushed a commit
that referenced
this pull request
Jun 19, 2026
A first-class group for SDK management, alongside `api`, `module`, `cloud`, `workspace` in the toolbox row of `dagger --help`. Workshopped against the alternatives `dagger install <ref> --as-sdk` and folding everything under `dagger module`; `sdk` won on four points: room to grow as a namespace (install / uninstall / list / search / module-options / client-options), built-in disambiguation (`dagger sdk install go` is unambiguous where `dagger install go` would force a `-sdk` suffix or sdks.json hijacking of the install verb), shorter than `--as-sdk` to type, and surfaces SDKs as a first-class concept in `--help`. Semantic split with the `module` group: SDK is the tool, module is the thing the SDK creates. `dagger sdk install` adds the SDK and marks it; `dagger module init <sdk> <name>` uses an installed SDK to create a module (positional dispatch — the typed init shape lands with task #127). Subcommands: - `install <name-or-ref>` — resolves through the embedded sdks.json registry (`go` → github.com/dagger/go-sdk), installs the module, and writes the empty `[modules.<name>.as-sdk]` marker. Workspace install name is the alias you typed (`go`), not the basename of the canonical ref (`go-sdk`) — short, and what muscle memory expects. Direct refs work too: `dagger sdk install github.com/foo/sdk` lands as `[modules.sdk]` by basename. Generic `dagger install <ref>` does NOT mark anything as an SDK; the marker is opt-in via this verb. - `uninstall <name>` — refuse-if-authored: errors when the SDK has entries under `[[modules.<name>.as-sdk.modules]]` or `[[modules.<name>.as-sdk.clients]]`. The check is CLI-side against the on-disk config — no session bootstrap to read TOML, and it has to happen before we dispatch the uninstall mutation. `--force` overrides; files on disk are left untouched, only the workspace entries go away. - `list` — reads `dagger.toml`, prints installs where `AsSDK != nil` with NAME / SOURCE / M / C columns (M = authored modules, C = generated clients). Cheap capability affordance until per-SDK introspection lands with task #129. - `search [query]` — lists embedded `sdks.json` entries. Substring match on name / alias / repo. No query = print all. - `module-options <sdk>` / `client-options <sdk>` — stubbed with a clear "not yet wired (pending SDK contract, task #129)" message rather than fabricating a flag list. They do validate that the named install exists *and* carries the as-sdk marker, so the user gets the useful "run `dagger sdk install <sdk>` first" hint when the install is missing. Engine: `Workspace.install` grows an `asSdk: Boolean = false` arg. When true and the install is fresh, the entry is created with `AsSDK: &workspace.ModuleAsSDK{}` (the empty marker). When the install is idempotent (same `name`/`source` already present), the marker is stamped onto the existing entry if missing — so a plain `dagger install go-sdk` followed by `dagger sdk install go-sdk` upgrades it in place rather than erroring. Workspace flag policy on install/uninstall: `local-only`, matching the generic install / uninstall verbs. Remote refs can't sneak in through `--workspace` and mutate someone else's config. CLI side calls `Workspace.install` with `asSdk: true` via raw GraphQL (`dag.Do`) until the Go SDK regenerates against the new schema — same pattern as `Workspace.moduleInit` already uses on this branch. Tests updated: `sdk` appears in the root-help Contains set and in the leaf-vs-parent ordering check. Future doc + PR description update in a follow-up commit. Signed-off-by: Solomon Hykes <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Andrea Luzzardi [email protected]