Expand description
Operate on a Debian package.
Workspace: an abstraction over the on-disk or in-editor state of a
Debian source package.
Fixers historically reached into the working tree directly via
std::fs. That ties them to a particular host (the lintian-brush CLI,
which writes the tree to disk before invoking fixers). The
Workspace trait abstracts that access so the same fixer code can
also run inside an editor host (debian-lsp), where the source of truth for
a file is the open buffer rather than the path on disk.
Two implementations are intended:
- [
FsWorkspace] — pure-stdshim that operates on a base directory on disk. Used by the lintian-brush CLI; preserves the existing semantics where the harness writes the tree to disk, the fixer mutates files there, and the harness diffs the result. LspWorkspace(lives in debian-lsp) — wraps a salsa-backed in-memory workspace. Mutations are accumulated as a singleWorkspaceEditrather than being written back to disk.
The trait is deliberately breezyshim-free so that hosts that don’t want
a Python runtime (notably debian-lsp) can depend on it without pulling in
PyO3.
Traits§
- Editor
- An editor handle for a single file in a
Workspace. - Workspace
- Access to a Debian source package, as seen by a fixer.
Functions§
- compat_
level - Read the debhelper compat level from a workspace.