#If you call `Directory.AsModule()` on a

1 messages · Page 1 of 1 (latest)

soft rain
#

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?

main bear
#

is install erroring or is it getting to AsModule()?

soft rain
#

Oh it's erroring on install, good point. I can try to manually construct the dagger.json instead

#

Did you manually edit dagger.json?

main bear
#

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 😆

soft rain