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§
- Implicit
Workspace - #3274: the workspace a manifest-less directory of projects stands for under
--each, with what it set aside. - Workspace
- A loaded workspace root and its members.
Enums§
- Implicit
Workspace Error - Why a directory is not an implicit workspace.
Functions§
- find_
parent_ workspace - The workspace root above
project_rootwhose members include it, if any. - implicit_
workspace - #3274: the implicit workspace at
root, a directory with nobynk.tomlof its own. Its members are the immediate subdirectories that hold abynk.toml, in name order:members = ["*"]as a real workspace reads it, except that a subdirectory without a manifest is set aside rather than an error (a repository of examples keeps adocs/beside them). Directories that discovery skips (hidden,out,node_modules) are never members. - is_
workspace_ root - Whether
dir’sbynk.tomlparses 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).