Skip to content

local: fix when include is not specified - #127

Merged
aluzzardi merged 1 commit into
mainfrom
local-include-fix
Feb 18, 2021
Merged

aluzzardi merged 1 commit into
mainfrom
local-include-fix

Conversation

@aluzzardi

Copy link
Copy Markdown
Contributor

Signed-off-by: Andrea Luzzardi [email protected]

@aluzzardi
aluzzardi merged commit fda6da8 into main Feb 18, 2021
@aluzzardi
aluzzardi deleted the local-include-fix branch February 18, 2021 02:51
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]>
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.

1 participant