#Silly Q, I have an SDK i'm wrapping
1 messages · Page 1 of 1 (latest)
IIUC, then yeah, right now Go SDK modules are pretty much only usable as dagger modules, not also as generally re-usable go modules. This is partially because they have to be a main package, which in Go is not importable as a package. But also due to various assumptions we currently bake in around the fact that the dagger module's codegen code is executing in a container.
This was actually intentional because:
- It's simpler to think about; we don't need to think about how to get the same code working seamlessly both when imported as a package (and thus potentially used directly executing on a host) and when used as a dagger module (in which case it's executing in a highly-controlled container)
- We want to encourage sharing of code by sharing dagger modules rather than by sharing language-specific packages. This is towards of general goal of growing a language-agnostic ecosystem (i.e. you can use your dagger modules from any language, as opposed to a go package which is obviously only importable in other go code)
However, this is definitely not the first time this sort of request has come up (cc @pallid wigeon), so if it's creating a huge burden for you @marble quartz then worth more re-consideration.