#If you call `Directory.AsModule()` on a
1 messages · Page 1 of 1 (latest)
I tried to repro in an integ test:
func (ModuleSuite) TestDirectoryAsModuleInvalidDep(ctx context.Context, t *testctx.T) {
c := connect(ctx, t)
_, err := goGitBase(t, c).
WithWorkdir("/work/dir/test").
With(daggerExec("init", "--name=test", "--sdk=go", "--source=.")).
WithWorkdir("/work").
With(daggerExec("init", "--name=dep", "--sdk=go", "--source=.")).
WithWorkdir("/work/dir/test").
With(daggerExec("install", "../..")).
Directory("/work/dir/test").
AsModule().
Sync(ctx)
require.Error(t, err)
}
But it just errors quickly, were you doing something slightly different?
is install erroring or is it getting to AsModule()?
Oh it's erroring on install, good point. I can try to manually construct the dagger.json instead
Did you manually edit dagger.json?
I did, yeah, but even this git https://github.com/kpenfound/dagger-modules | head | tree | directory proxy/examples/go | as-module fails right away so I'm not sure how it's different
I'm not actually blocked by this or anything so maybe if it's not reproducible we can forget about it 😆
Yeah I'm mostly wondering if there's any deeper issues. I'll poke at it for another min but my first attempt at writing a dagger.json manually with a non-existent ../.. dep still errored quickly, so will leave it be if no successful repro