#`dagger mod extend` 🧵

1 messages Ā· Page 1 of 1 (latest)

river shore
#

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"
}
marsh barn
#

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"]
}
river shore
#

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
marsh barn
#

at least it's consistent!

river shore
#

true!

#

I can use a local path for now if it's something that needs some digging

marsh barn
#

I think I see the code that's causing this, working on a fix

river shore
marsh barn
#

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

river shore
#

noice!

river shore
#

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

marsh barn
#

@river shore try passing --focus=false, that should show whatever error is happening

river shore
#

Cannot query field "golang" on type "Query". where golang is the name of the remote module

marsh barn
#

gotta tweak the JSON encoder, that's a bit overkill

river shore
#

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

marsh barn
#

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

river shore
#

awesome, thanks for the help!

marsh barn
#

I'm able to repro, looks like module dependency APIs aren't being stitched in

river shore
#

at least it's not just me šŸ™‚