Skip to content

cli: allow calling core functions directly - #7310

Merged
helderco merged 6 commits into
dagger:mainfrom
helderco:helder/oss-192-allow-calling-core-functions-from-the-cli
Aug 9, 2024
Merged

helderco merged 6 commits into
dagger:mainfrom
helderco:helder/oss-192-allow-calling-core-functions-from-the-cli

Conversation

@helderco

@helderco helderco commented May 7, 2024 •

Copy link
Copy Markdown
Contributor

Fixes #6947

Current implementation uses a top-level command for core functions:

  • dagger core <function> → execute a function from the core API
  • dagger call -m <module> <function> → execute a function from a module

How

Can be run from anywhere as it doesn't require a module to load:

❯ dagger core version
[dev-fdc07a5bfb46ca6a37ae379d767210d54f141c4f](version: v0.12.5-010101000000-dev-8e3b1f29b72b)

Allows experimentation in the CLI without the need for a module

❯ dagger core container from --address=alpine file --path=/etc/os-release contents
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.20.2
PRETTY_NAME="Alpine Linux v3.20"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Can be a nice alternative to docker run:

❯ dagger core container from --address=cgr.dev/chainguard/wolfi-base terminal
dagger / $ 

Without arguments:

❯  dagger core
_type: Client
defaultPlatform: linux/arm64
version: v0.12.5-010101000000-dev-8e3b1f29b72b

Listing:

❯  dagger core --help
Call a core function

USAGE
  dagger core [options] <function>

FUNCTIONS
  blob                Retrieves a content-addressed blob.
  container           Creates a scratch container.
  current-type-defs   The TypeDef representations of the objects currently being served in the session.
  dagger-engine       The Dagger engine container configuration and state
  default-platform    The default platform of the engine.
  directory           Creates an empty directory.
  git                 Queries a Git repository.
  host                Queries the host environment.
  http                Returns a file containing an http remote url content.
  module              Create a new module.
  module-dependency   Create a new module dependency configuration from a module source and name
  module-source       Create a new module source instance from a source ref string.
  version             Get the current Dagger Engine version.

OPTIONS
  -j, --json            Present result as JSON
  -o, --output string   Save the result to a local file or directory

INHERITED OPTIONS
  -d, --debug             Show debug logs and full verbosity
  -i, --interactive       Spawn a terminal on container exec failure
      --progress string   Progress output format (auto, plain, tty) (default "auto")
  -q, --quiet count       Reduce verbosity (show progress, but clean up at the end)
  -s, --silent            Do not show progress at all
  -v, --verbose count     Increase verbosity (use -vv or -vvv for more)
  -w, --web               Open trace URL in a web browser

Use "dagger core [command] --help" for more information about a command.

Next

The core top-level command is possibly a stepping stone to select a few core functions as their own top-level commands. That'll open up creating more commands by implementing them via the API rather than client side. \cc @sipsma

@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from ea1d2ce to 797666b Compare May 20, 2024 17:30
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from 797666b to 27589db Compare May 20, 2024 18:51
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from 27589db to babaf87 Compare May 21, 2024 14:41
@helderco

This comment was marked as outdated.

@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch 2 times, most recently from 0751d1f to 86e4ba2 Compare May 29, 2024 07:21
@github-actions

This comment was marked as resolved.

@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch 2 times, most recently from 69e2259 to a89b77a Compare June 24, 2024 10:05
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch 2 times, most recently from 7308bbe to 270f1c7 Compare June 28, 2024 23:59
@helderco

This comment was marked as outdated.

@helderco
helderco marked this pull request as ready for review June 29, 2024 00:03
@helderco
helderco requested a review from a team as a code owner June 29, 2024 00:03
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from 270f1c7 to cbe1733 Compare June 29, 2024 19:14
@github-actions

This comment was marked as resolved.

@helderco helderco added area/cli All about go code on dagger CLI and removed kind/stale labels Jul 15, 2024
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch 2 times, most recently from 04ecc57 to d3d4c27 Compare July 23, 2024 10:51
@helderco

helderco commented Jul 23, 2024 •

Copy link
Copy Markdown
Contributor Author

Reimplemented as dagger core after some discussions in Discord. See:

@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch 2 times, most recently from fa9eb72 to 8dc5cf6 Compare July 23, 2024 12:57
@helderco
helderco requested review from shykes and sipsma July 23, 2024 13:55
@helderco helderco removed the area/cli All about go code on dagger CLI label Jul 23, 2024
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch 2 times, most recently from a63546e to fec9347 Compare July 24, 2024 10:42
Comment thread cmd/dagger/module.go Resolved
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from fec9347 to 9966037 Compare August 2, 2024 14:54
@helderco
helderco requested a review from a team as a code owner August 2, 2024 14:54
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch 2 times, most recently from 43b40e1 to 571c218 Compare August 8, 2024 13:46

@shykes shykes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've been iterating for a while, I think we should merge and make adjustments as needed.

I also like call --core, but after discussing with @helderco, dagger core has a few advantages.

@jedevc jedevc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of cli changes, so hopefully okay to not review in lots of details, but I like the changes that simplify the FuncCommand fields, those were tricky before.

Left some small nits, but LGTM.

Comment thread sdk/go/querybuilder/querybuilder.go Resolved
Comment thread docs/static/api/reference/index.html Resolved
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from 571c218 to 1d36e77 Compare August 8, 2024 20:25
@helderco

helderco commented Aug 8, 2024

Copy link
Copy Markdown
Contributor Author

I also like call --core, but after discussing with @helderco, dagger core has a few advantages.

We can keep the refactoring that allows the stepping stone to dagger container. It's a very small change to turn this back into the call --core flag. The inverse wasn't true but that work is done and not lost. It would take around 5mins to switch to the flag.

Basically add the mutually exclusive flag (code already in a previous commit in this PR), and set fc.DisableModuleLoad = true dynamically if --core is set, instead of statically here:

var callCoreCmd = &FuncCommand{
Name: "core [options]",
Short: "Call a core function",
DisableModuleLoad: true,
}
var callModCmd = &FuncCommand{
Name: "call [options]",
Short: "Call one or more functions, interconnected into a pipeline",
}

Perhaps at least mark dagger core as experimental which shows a message in dagger core --help (the feature is still available, even though we're not using it in any command atm). That would signal to users that it could later change to something else, whether it's dagger call -c container or dagger container.

@jedevc jedevc added this to the v0.12.5 milestone Aug 9, 2024
@jedevc

jedevc commented Aug 9, 2024

Copy link
Copy Markdown
Contributor

Perhaps at least mark dagger core as experimental which shows a message in dagger core --help (the feature is still available, even though we're not using it in any command atm)

I think this is worth doing regardless.

I'd also be happier with a --core flag - but at this point, we've been discussing for so longer, I really really would just rather ship something in the next release. As you mention, if it's experimental, we can adjust with feedback later 🎉

I've added this to the next milestone, so we'll definitely get this for the next release - at least then we've got an upper limit on how long we're allowed to keep discussing this for 😆

@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from 1d36e77 to daa7a44 Compare August 9, 2024 12:23
@helderco

helderco commented Aug 9, 2024 •

Copy link
Copy Markdown
Contributor Author

I added the "experimental" annotation. This way it's justifiable if we decide to change the DX. Just waiting for the checks to pass before merge.

@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from daa7a44 to cf99584 Compare August 9, 2024 13:12
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
When `call` was initially created it was as part of a few verb based top-level commands (download, up, shell...), where `call` was about just printing the result.

These commands were later merged into just `call`, so moved the `call` overrides for printing to `FuncCommand` so that any command that uses function chaining has the same features that `call` has. This refactor was done now because this commit introduces another top-level command that needs `dagger call` capabilities.

At the same time, `dagger functions` was implemented as a weird hack that circumvented the function chaining as sub-commands, so we needed a few checks to bypass those. However, `dagger functions` doesn't really need any of the behavior in `FuncCommand` so it's just better to make it a `cobra.Command` instead.

Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
@helderco
helderco force-pushed the helder/oss-192-allow-calling-core-functions-from-the-cli branch from cf99584 to 60baf81 Compare August 9, 2024 13:32
@helderco
helderco merged commit 164de47 into dagger:main Aug 9, 2024
@helderco
helderco deleted the helder/oss-192-allow-calling-core-functions-from-the-cli branch August 9, 2024 14:02
scottames referenced this pull request in scottames/dots Aug 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dagger/dagger](https://togithub.com/dagger/dagger) | patch |
`v0.12.4` -> `v0.12.5` |

---

### Release Notes

<details>
<summary>dagger/dagger (dagger/dagger)</summary>

###
[`v0.12.5`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0125---2024-08-15)

[Compare
Source](https://togithub.com/dagger/dagger/compare/v0.12.4...v0.12.5)

##### Added

- cli: allow calling core functions directly by
[@&#8203;helderco](https://togithub.com/helderco) in
[https://github.com/dagger/dagger/pull/7310](https://togithub.com/dagger/dagger/pull/7310)
\
    Usage: `dagger core <function>` \
    Example: `dagger core container from --address=alpine terminal`

Works the same as `dagger call`, but instead of loading a user module,
    it only uses functions from the core API.

    Run `dagger core --help` for available functions.

*Note that this command is experimental and the DX for calling core
functions
    in the CLI may change in the future.*
- New SDK aliases for `elixir` and `php` by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8067](https://togithub.com/dagger/dagger/pull/8067)
\
SDKs with experimental module support (elixir and php) can now be
accessed
using `--sdk=<sdk>` (such as `--sdk=elixir` and `--sdk=php`
respectively)
    instead of the full form
    `--sdk=github.com/dagger/dagger/sdk/<sdk>@&#8203;<version>`.
- Add `File.digest` method by
[@&#8203;TomChv](https://togithub.com/TomChv) in
[https://github.com/dagger/dagger/pull/8114](https://togithub.com/dagger/dagger/pull/8114)
\
This method provides an efficient way to compute a file's digest, which
    unlock optimized file comparison or check for file changes.
- Bundle CLI in the Engine image so that both parts of Dagger
(CLI+Engine) ship as a single artefact by
[@&#8203;gerhard](https://togithub.com/gerhard) in
[https://github.com/dagger/dagger/pull/8147](https://togithub.com/dagger/dagger/pull/8147)

##### Changed

- Reimplemented the OpenTelemetry data pipeline to avoid hangs and other
complications by [@&#8203;vito](https://togithub.com/vito) in
[https://github.com/dagger/dagger/pull/7996](https://togithub.com/dagger/dagger/pull/7996)

##### Fixed

- Fix `Directory.glob` to correctly handle globs with subdir prefixes by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8110](https://togithub.com/dagger/dagger/pull/8110)
\
Previously, attempting to glob with a prefix subdir in a pattern like
`<subdir>/*` would not match any files. This should now be fixed, and
files
    in `<subdir>` will now be correctly matched.
- Fix `failed to collect IDs from parent fields` error when module
objects contain fields with nil values by
@&#8203;jedevc/[@&#8203;sipsma](https://togithub.com/sipsma) in
[https://github.com/dagger/dagger/pull/8132](https://togithub.com/dagger/dagger/pull/8132)
- Fixed enum lists in modules by
[@&#8203;helderco](https://togithub.com/helderco) in
[https://github.com/dagger/dagger/pull/8096](https://togithub.com/dagger/dagger/pull/8096)
- Fixed referring to module's own objects/interfaces/enums in
constructor signature by [@&#8203;jedevc](https://togithub.com/jedevc)
in
[https://github.com/dagger/dagger/pull/8115](https://togithub.com/dagger/dagger/pull/8115)
\
Previously, modules would fail to launch if they declared a constructor
that
    contained a reference to a type from it's own module in it's args.
- Fixed using custom enum types as optional arguments by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8148](https://togithub.com/dagger/dagger/pull/8148)
\
Previously, function calls that defined an optional argument would not
be
    callable.
- Make retrieving secret from command works on Windows by
[@&#8203;wingyplus](https://togithub.com/wingyplus) in
[https://github.com/dagger/dagger/pull/8121](https://togithub.com/dagger/dagger/pull/8121)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone
America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/scottames/dots).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
scottames referenced this pull request in scottames/containers Aug 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dagger/dagger](https://togithub.com/dagger/dagger) | patch |
`v0.12.4` -> `v0.12.5` |

---

### Release Notes

<details>
<summary>dagger/dagger (dagger/dagger)</summary>

###
[`v0.12.5`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0125---2024-08-15)

[Compare
Source](https://togithub.com/dagger/dagger/compare/v0.12.4...v0.12.5)

##### Added

- cli: allow calling core functions directly by
[@&#8203;helderco](https://togithub.com/helderco) in
[https://github.com/dagger/dagger/pull/7310](https://togithub.com/dagger/dagger/pull/7310)
\
    Usage: `dagger core <function>` \
    Example: `dagger core container from --address=alpine terminal`

Works the same as `dagger call`, but instead of loading a user module,
    it only uses functions from the core API.

    Run `dagger core --help` for available functions.

*Note that this command is experimental and the DX for calling core
functions
    in the CLI may change in the future.*
- New SDK aliases for `elixir` and `php` by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8067](https://togithub.com/dagger/dagger/pull/8067)
\
SDKs with experimental module support (elixir and php) can now be
accessed
using `--sdk=<sdk>` (such as `--sdk=elixir` and `--sdk=php`
respectively)
    instead of the full form
    `--sdk=github.com/dagger/dagger/sdk/<sdk>@&#8203;<version>`.
- Add `File.digest` method by
[@&#8203;TomChv](https://togithub.com/TomChv) in
[https://github.com/dagger/dagger/pull/8114](https://togithub.com/dagger/dagger/pull/8114)
\
This method provides an efficient way to compute a file's digest, which
    unlock optimized file comparison or check for file changes.
- Bundle CLI in the Engine image so that both parts of Dagger
(CLI+Engine) ship as a single artefact by
[@&#8203;gerhard](https://togithub.com/gerhard) in
[https://github.com/dagger/dagger/pull/8147](https://togithub.com/dagger/dagger/pull/8147)

##### Changed

- Reimplemented the OpenTelemetry data pipeline to avoid hangs and other
complications by [@&#8203;vito](https://togithub.com/vito) in
[https://github.com/dagger/dagger/pull/7996](https://togithub.com/dagger/dagger/pull/7996)

##### Fixed

- Fix `Directory.glob` to correctly handle globs with subdir prefixes by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8110](https://togithub.com/dagger/dagger/pull/8110)
\
Previously, attempting to glob with a prefix subdir in a pattern like
`<subdir>/*` would not match any files. This should now be fixed, and
files
    in `<subdir>` will now be correctly matched.
- Fix `failed to collect IDs from parent fields` error when module
objects contain fields with nil values by
@&#8203;jedevc/[@&#8203;sipsma](https://togithub.com/sipsma) in
[https://github.com/dagger/dagger/pull/8132](https://togithub.com/dagger/dagger/pull/8132)
- Fixed enum lists in modules by
[@&#8203;helderco](https://togithub.com/helderco) in
[https://github.com/dagger/dagger/pull/8096](https://togithub.com/dagger/dagger/pull/8096)
- Fixed referring to module's own objects/interfaces/enums in
constructor signature by [@&#8203;jedevc](https://togithub.com/jedevc)
in
[https://github.com/dagger/dagger/pull/8115](https://togithub.com/dagger/dagger/pull/8115)
\
Previously, modules would fail to launch if they declared a constructor
that
    contained a reference to a type from it's own module in it's args.
- Fixed using custom enum types as optional arguments by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8148](https://togithub.com/dagger/dagger/pull/8148)
\
Previously, function calls that defined an optional argument would not
be
    callable.
- Make retrieving secret from command works on Windows by
[@&#8203;wingyplus](https://togithub.com/wingyplus) in
[https://github.com/dagger/dagger/pull/8121](https://togithub.com/dagger/dagger/pull/8121)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone
America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/scottames/containers).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
renovate Bot referenced this pull request in scottames/daggerverse Aug 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dagger/dagger](https://togithub.com/dagger/dagger) | patch |
`v0.12.4` -> `v0.12.5` |

---

### Release Notes

<details>
<summary>dagger/dagger (dagger/dagger)</summary>

###
[`v0.12.5`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0125---2024-08-15)

[Compare
Source](https://togithub.com/dagger/dagger/compare/v0.12.4...v0.12.5)

##### Added

- cli: allow calling core functions directly by
[@&#8203;helderco](https://togithub.com/helderco) in
[https://github.com/dagger/dagger/pull/7310](https://togithub.com/dagger/dagger/pull/7310)
\
    Usage: `dagger core <function>` \
    Example: `dagger core container from --address=alpine terminal`

Works the same as `dagger call`, but instead of loading a user module,
    it only uses functions from the core API.

    Run `dagger core --help` for available functions.

*Note that this command is experimental and the DX for calling core
functions
    in the CLI may change in the future.*
- New SDK aliases for `elixir` and `php` by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8067](https://togithub.com/dagger/dagger/pull/8067)
\
SDKs with experimental module support (elixir and php) can now be
accessed
using `--sdk=<sdk>` (such as `--sdk=elixir` and `--sdk=php`
respectively)
    instead of the full form
    `--sdk=github.com/dagger/dagger/sdk/<sdk>@&#8203;<version>`.
- Add `File.digest` method by
[@&#8203;TomChv](https://togithub.com/TomChv) in
[https://github.com/dagger/dagger/pull/8114](https://togithub.com/dagger/dagger/pull/8114)
\
This method provides an efficient way to compute a file's digest, which
    unlock optimized file comparison or check for file changes.
- Bundle CLI in the Engine image so that both parts of Dagger
(CLI+Engine) ship as a single artefact by
[@&#8203;gerhard](https://togithub.com/gerhard) in
[https://github.com/dagger/dagger/pull/8147](https://togithub.com/dagger/dagger/pull/8147)

##### Changed

- Reimplemented the OpenTelemetry data pipeline to avoid hangs and other
complications by [@&#8203;vito](https://togithub.com/vito) in
[https://github.com/dagger/dagger/pull/7996](https://togithub.com/dagger/dagger/pull/7996)

##### Fixed

- Fix `Directory.glob` to correctly handle globs with subdir prefixes by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8110](https://togithub.com/dagger/dagger/pull/8110)
\
Previously, attempting to glob with a prefix subdir in a pattern like
`<subdir>/*` would not match any files. This should now be fixed, and
files
    in `<subdir>` will now be correctly matched.
- Fix `failed to collect IDs from parent fields` error when module
objects contain fields with nil values by
@&#8203;jedevc/[@&#8203;sipsma](https://togithub.com/sipsma) in
[https://github.com/dagger/dagger/pull/8132](https://togithub.com/dagger/dagger/pull/8132)
- Fixed enum lists in modules by
[@&#8203;helderco](https://togithub.com/helderco) in
[https://github.com/dagger/dagger/pull/8096](https://togithub.com/dagger/dagger/pull/8096)
- Fixed referring to module's own objects/interfaces/enums in
constructor signature by [@&#8203;jedevc](https://togithub.com/jedevc)
in
[https://github.com/dagger/dagger/pull/8115](https://togithub.com/dagger/dagger/pull/8115)
\
Previously, modules would fail to launch if they declared a constructor
that
    contained a reference to a type from it's own module in it's args.
- Fixed using custom enum types as optional arguments by
[@&#8203;jedevc](https://togithub.com/jedevc) in
[https://github.com/dagger/dagger/pull/8148](https://togithub.com/dagger/dagger/pull/8148)
\
Previously, function calls that defined an optional argument would not
be
    callable.
- Make retrieving secret from command works on Windows by
[@&#8203;wingyplus](https://togithub.com/wingyplus) in
[https://github.com/dagger/dagger/pull/8121](https://togithub.com/dagger/dagger/pull/8121)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone
America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/scottames/daggerverse).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
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.

Allow calling core functions from the CLI

3 participants