dagger icon indicating copy to clipboard operation
dagger copied to clipboard

✨ Dagger Install Module within Git Root / Monorepository

Open rawkode opened this issue 1 year ago • 1 comments

What are you trying to do?

I would like to make it easier to install a module from the root of a Git repository, especially useful for mono repositories.

Options

Override "root"

While this may seem confusing, it's a pretty nice syntax and Dagger already blocks its usage outside of a Git repository; why not allow this and provide a warning when used that it's scoped to the Git repository instead of blocking it?

dagger install /dagger/MODULE

git+file

Uses the existing git+PROTOCOL selector, and git+file:// is pretty common across GitHub:

https://github.com/search?q=%22git%2Bfile%22&type=code

dagger install git+file://dagger/MODULE

Both

Support both 👍🏻

Why is this important to you?

Within a mono repository, it's nice to have an internal Daggerverse. Providing a monorepo internal syntax, or even for any Git repository would make consuming local modules a lot easier.

How are you currently working around this?

At the moment, I've got a lot of ../../../../dagger/MODULE within my deeply nested dagger.json files across my monorepository.

rawkode avatar Sep 09 '24 12:09 rawkode

I realised that when I use Bazel, I use labels.

I guess what I'm looking for is something akin to that for Dagger, where we can use the dagger.json name, or some other identifier, to reference other local modules.

rawkode avatar Sep 12 '24 09:09 rawkode