Skip to content

Standardize how official modules find config dirs (cwd-aware) #13688

Closed

Description

@shykes

Problem

There is no convention for how modules discover config directories in the workspace, and in particular how the client's CWD affects the result. We should standardize this across all official modules: consistent behavior, CWD used for filtering (act on the project you're in, like go/npm/cargo), and a clear example for community developers.

Solution

One reusable Dang function. Both walks anchor at the client's CWD (.), never the workspace root — so discovery lives in exactly one place and every module's entry point collapses to a call to it. Later we could upstream it as a core Workspace method.

Implemented in github.com/dagger/polyfill

Checklist

SDKs

Language toolchains

Tooling modules

Linters / formatters

Test frameworks

Activity

  1. changed the title [-]standardize how official modules find config dirs[/-] [+]Standardize how official modules find config dirs (cwd-aware)[/+] on Jul 18, 2026
  2. added this to the v1.0.0 milestone on Jul 18, 2026
  3. TomChv commented on Jul 20, 2026

    @TomChv
    Member

    With dagger/polyfill#1 merged, we can use workspace.findConfigDir for our modules

  4. 10 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions