#I noticed that "moduleSource" api

1 messages · Page 1 of 1 (latest)

bitter moss
#

Local

✔ moduleSource(refString: "bar2"): ModuleSource! 0.0s
✔ moduleDependency(
    source: ✔ moduleSource(refString: "bar2"): ModuleSource! 0.0s
  ): ModuleDependency! 0.0s

vs git

✘ moduleSource(refString: "github.com/rkne/daggerverse/hello"): ModuleSource! 0.5s
! failed to resolve git src to commit: failed to load cache key: error fetching default branch for repository https://github.com/rkne/daggerverse: git error: exit status 128
  ✘ cache request: git://github.com/rkne/daggerverse 0.5s
  ! error fetching default branch for repository https://github.com/rkne/daggerverse: git error: exit status 128

Error: failed to generate code: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: error fetching default branch for repository https://github.com/rkne/daggerverse: git error: exit status 128
stderr:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
#

neither bar2 nor that git repo exists.

cobalt whale
#

hm that is surprising, but i don't think it's unexpected

#

the reason is that the process of getting a git source requires determining the default branch + getting tags

#

but local sources can be loaded entirely lazily

#

it's weird, but these apis aren't really user facing, so quite low priority imo

bitter moss
#

okay... I will check if I can make my uninstall work without using this api.

#

should be doable. just I was surprised that local source uninstallation works, but git ref failed 🙂