#I notice that from a module we can do

1 messages · Page 1 of 1 (latest)

echo hornet
#

To clarify, dag.Host().File() will load a file from the module container's "host", which is actually just the container. So e.g. if in your module code you did os.WriteFile("./foo", []byte("foo")), dag.Host().File("./foo") would load that file from the module container's filesystem, not the "outside caller's host".

While that makes the behavior technically consistent with how the SDKs work today (read from your filesystem as in the filesystem of the SDK code making the call), the name Host is really confusing now. This comes up pretty much every day now 😅

#

I'm gonna open an issue to figure out a better name for this than Host

#

But what you're getting at, the ability for module code to programmatically read from the CLI caller's host (filesystem, environment, etc.) is something we're leaving as an option on the table but is not currently possible and requires a lot more design+thought before we pursue.

This other discord thread was talking about the same subject: https://discord.com/channels/707636530424053791/1186762415598211082

And the gh issue linked in there also has a lot more discussion about this general problem: https://github.com/dagger/dagger/issues/6112