#Contextual modules

1 messages ยท Page 1 of 1 (latest)

vivid olive
#

I almost understand this.

Basically removes the need for a function that exists alongside something else to accept source --path . constantly right? Whilst still allowing for standalone modules intended for shell usage or SDK extension that don't need to be context-aware?

Any chance this could be developed into a hidden poc for an upcoming release, much like the views were?

tiny bobcat
#

@vivid olive I read the issue but my "aha" moment was when I read this comment of yours. Would you mind posting this on the issue itself? And @chrome bear I think adding this to the description as an alternate explanation might help too.

chrome bear
tiny bobcat
#

Basically removes the need for a function that exists alongside something else to accept source --path . constantly

#

The fact that you don't need to pass in source for every cli command (for contextual) is the most useful piece. That piece made sense to me probably because I am an experienced module developer. Probably won't make a difference to a new module dev.

vivid olive
#

The bit I didn't really get was "enclosing directory". If at my project root I have:

package.json
dagger.json
.dagger
#

Then I'm assuming "enclosing directory" is that project root

chrome bear
#

it's the same mechanism as for a Dockerfile. Except instead of a contextual file (Dockerfile) it's a contextual directory (.dagger).

#

Also similar to .github

vivid olive
#

The edited issue is much clearer ๐Ÿ‘

chrome bear
#

I'm currently replying to all the comments in there. Let me know if the new edited issue still has ambiguity

chrome bear
#

This solves another problem, which is that there's no clear way to have CI for your own standalone dagger modules. This clarifies how to do it: just add a contextual module inside your module, with functions needed to develop that module

vivid olive
chrome bear
tiny bobcat
#

Will that allow me to run dagger call functions from the root of my source code without specifying the module name? Or would that still required me to convert my own code into a module?

#

For example, if I have a cidirectory. From my project root can I call dagger call functions (given ci is a singular module). Or do I do dagger call -m ci functions

chrome bear