#`dagger mod extend` š§µ
1 messages Ā· Page 1 of 1 (latest)
currently trying this for a module in git:
dagger mod extend "git://github.com/kpenfound/dagger-modules?ref=main&subpath=golang&protocol=https"
WARNING: Using development engine; skipping version compatibility check.
⢠Engine: 4bad8febbbb7 (version devel ())
ā§ 0.55s ā 4 ā 1
Error: failed to run codegen: failed to load dependencies: failed to load dependency module: failed to read local config file: open /Users/kylepenfound/github.com/greetings-api/ci/git:/github.com/kpenfound/dagger-modules?ref=main&subpath=golang/dagger.json: no such file or directory
it looks like it's looking for it relative to my local path
dagger.json in current directory is
{
"root": "../",
"name": "greetings",
"sdk": "go"
}
i'm not sure why the command isn't working, but you could try adding the value to the dagger.json and running dagger mod sync:
{
"root": "../",
"name": "greetings",
"sdk": "go",
"dependencies": ["git://github.com/kpenfound/dagger-modules?ref=main&subpath=golang&protocol=https"]
}
oh weird, it's actually the same error
dagger mod sync
WARNING: Using development engine; skipping version compatibility check.
⢠Engine: 4bad8febbbb7 (version devel ())
ā§ 0.56s ā 4 ā 1
Error: failed to run codegen: failed to load dependencies: failed to load dependency module: failed to read local config file: open /Users/kylepenfound/github.com/greetings-api/ci/git:/github.com/kpenfound/dagger-modules?ref=main&subpath=golang&protocol=https/dagger.json: no such file or directory
at least it's consistent!
I think I see the code that's causing this, working on a fix
nice! is it this? https://github.com/dagger/dagger/blob/f3edc96ab38dc308b45cc3e5404b32fb39e329b6/cmd/dagger/module.go#L388
yeah no idea why it's hardcoded like that haha. have a fix, just committing other things first
@river shore @earnest portal pushed!
tested locally, seems to work fine. you don't need the protocol= or ref= params
noice!
Running into a different error that I think is still related to the git dependency:
echo '{greetings{helloWorld}}' | dagger query
WARNING: Using development engine; skipping version compatibility check.
⢠Engine: ea5bac100ae4 (version devel ())
ā§ 2.22s ā 16 ā
1 ā 3
Error: failed to load module: failed to install module: input:1: host.directory.asModule failed to call module to get functions: failed to get function output directory: process "go build -o /runtime -ldflags -s -d -w ." did not complete successfully: exit code: 1
Please visit https://dagger.io/help#go for troubleshooting guidance.
The remote module and local module both pass a go build
https://github.com/kpenfound/greetings-api/blob/zenith/ci/main.go
@river shore try passing --focus=false, that should show whatever error is happening
Cannot query field "golang" on type "Query". where golang is the name of the remote module
just to rule out silly things, try replacing the \u0026 with & in here? https://github.com/kpenfound/greetings-api/blob/zenith/ci/dagger.json#L6C62-L6C68
gotta tweak the JSON encoder, that's a bit overkill
interesting, if I replace that with & and run dagger mod sync, it goes back to \u0026 lol. Anyway it appears as if it can clone ok
really need to fix that warning repeating all the time
it probably reverts back because dagger mod sync and dagger mod init are mostly the same thing
will take a closer look once I'm done investigating another issue
awesome, thanks for the help!
I'm able to repro, looks like module dependency APIs aren't being stitched in
at least it's not just me š