#How do you make it convenient to call?

1 messages · Page 1 of 1 (latest)

waxen path
#

Dagger calls are a bit long, not the same as running a tool like mage locally if I'm calling a remote module especially.
I see dagger still has mage in the project, and saw another repo with a Taskfile for invoking (in one function I'm doing this for very simplistic task test --watch).

Do you use the raw dagger call in your day to day or wrap with something else? ❔

fringe rain
#

(speaking for myself) I use raw dagger calls. If I'm the maintainer of a module, I'll default arg values to the most common use case and with context directories the number of args I actually pass is small/none. For example, these days I might just need to run dagger call go lint if I'm working on the dagger/dagger repo

pallid isle
#

Yeah speaking for our own repo, mage is on its way out. It's only left as a legacy at this point

teal ingot
#

If you need external dagger dependencies rather than fully qualify them in a cli call you could just add them as a dagger dependency and use them in the dagger code. My dagger calls range from dagger call somefunc --src=.:src to much longer, but those longer ones are just because I have calls with lots of args (tokens, dir paths, blah, blah). Bear in mind more dependencies will increase your init time when not cached.

So if you need that external functionality but want a shorter cli call it seems to me like you could just pull it in as a dependency and then wrap it. I tend to do more specific things with those external deps rather than just wrapping them, but nothing stopping you from simply wrapping the functionality you want.

TLDR I use raw calls, but I only call internal functions (which sometimes use external dagger dependencies.)

pallid isle
#

With contextual directory access, those commands get shorter. We'll add context auth access to make it even shorter

#

No more --src=...

#

dagger call build

teal ingot