#Not at the moment; the recommended

1 messages · Page 1 of 1 (latest)

charred jungle
#

I do like the idea of a bash sdk, however, the issue with modules is that functions need to be methods on a struct

What I'm looking for is a way to extend the container/file/directory apis with helper functions without the need for a custom type

charred jungle
reef pewter
# charred jungle Here is a perfect example https://github.com/dagger/dagger/blob/main/.dagger/uti...

we're phasing out this style of helpers in our own CI, they're remnants of pre-modules Dagger. ..

I agree a simple way to extend the core types would be nice. For now you can make top-level helper functions that take eg a container as argument and return a container, or 2) a wrapper type.

Option 1 works just fine. You just don't get the syntactic sugar of Container.With since that's not actually a real function in the core API, just a codegen convention followed by some SDKs (I am wary of it for that reason).

#

One powerful feature that we want to leverage more in the future is interfaces.

We discussed making the core types themselves interfaces. That could allow extenting them seamlessly.