Skip to main content

Module workspace

Module workspace 

Source
Expand description

Packaging slice 1 (#2207, decision C): workspaces.

A workspace root is a directory whose bynk.toml holds [workspace] (and may hold [registries]) and nothing else: it is never a project itself, the Cargo “virtual manifest”. Its members are the directories members matches, minus those exclude matches, each holding its own bynk.toml.

A pattern is a relative path whose components may use * (any run of characters) and ? (one character); each * matches within one directory level. A hidden directory is matched only by a component that itself starts with ..

A project finds the workspace it belongs to by walking up for a [workspace] whose members include it (find_parent_workspace). A parent bynk.toml that doesn’t parse, has an unknown table, or doesn’t list the project counts as absent, so one broken unrelated manifest can’t break every project nested under it.

Structs§

Workspace
A loaded workspace root and its members.

Functions§

find_parent_workspace
The workspace root above project_root whose members include it, if any.
is_workspace_root
Whether dir’s bynk.toml parses and holds a [workspace] table. A manifest that doesn’t parse isn’t a workspace root: the command that reads it next reports it as malformed.
load_workspace
Load the workspace rooted at root: check its manifest, refuse sources at the root, and resolve its members. A workspace whose patterns match no member is an error, as an unknown table is (#1665).