#Custom types as parameters to dagger functions?

1 messages · Page 1 of 1 (latest)

finite narwhal
#

Can I pass custom types from one module to the next? I have been serializing my objects as JSON and passing them from one dagger module to the next. https://docs.dagger.io/manuals/developer/custom-types/ . I thought about also using protocol buffers which seems like a lot.

A Dagger module can have multiple object types defined. It's important to understand that they are only accessible through chaining, starting from a function in the main object.

quartz silo
#

You can accept a custom type from your own module as a parameter, but you cannot accept one from a different module or package. There is an issue were we have been debating the kind of problems we would face if implementing this but I can't seem to find. I'll keep looking

Marshaling/unmarshaling and using a dagger.File or similar is something that I regularly do as well

finite narwhal
#

I have another trick

quartz silo
quartz silo
finite narwhal
#

Thanks