MCPcopy Index your code
hub / github.com/dagger/dagger / detectAndLoadWorkspace

Method detectAndLoadWorkspace

engine/server/session_workspaces.go:312–323  ·  view source on GitHub ↗

detectAndLoadWorkspace is the unified core of workspace detection and module loading for local workspaces.

(
	ctx context.Context,
	client *daggerClient,
	statFS core.StatFS,
	readFile func(context.Context, string) ([]byte, error),
	cwd string,
	resolveLocalRef func(ws *workspace.Workspace, relPath string) string,
	workspaceAddress func(ws *workspace.Workspace) string,
	isLocal bool,
)

Source from the content-addressed store, hash-verified

310// detectAndLoadWorkspace is the unified core of workspace detection and module loading
311// for local workspaces.
312func (srv *Server) detectAndLoadWorkspace(
313 ctx context.Context,
314 client *daggerClient,
315 statFS core.StatFS,
316 readFile func(context.Context, string) ([]byte, error),
317 cwd string,
318 resolveLocalRef func(ws *workspace.Workspace, relPath string) string,
319 workspaceAddress func(ws *workspace.Workspace) string,
320 isLocal bool,
321) error {
322 return srv.detectAndLoadWorkspaceWithRootfs(ctx, client, statFS, readFile, cwd, resolveLocalRef, workspaceAddress, isLocal, dagql.ObjectResult[*core.Directory]{})
323}
324
325// pendingModule represents a module to be loaded from compat parsing,
326// -m flags, or the implicit CWD module.