Documentation
¶
Overview ¶
Package workspace loads the analysis inputs strictcode reconstructs from disk (DESIGN.md section 6.6): the rlsbl workspace file (.rlsbl-monorepo/workspace.toml) when present, the per-member manifests (pyproject.toml, package.json, go.mod), declared dependency scopes, and manifest-declared entry points. Nothing is passed at runtime by any caller; everything is read, not owned.
Without a workspace file, the root is a single-project scan: one synthesized member named "_" at path ".".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeclaredDep ¶
DeclaredDep is one manifest-declared dependency, as written (registry name) with its scope.
type DepScope ¶
type DepScope string
DepScope is a declared dependency's scope (vocabulary enum dependency_scope).
type EntryPoint ¶
type EntryPoint struct {
// Form is a vocabulary entry_point_form value: script, gui_script,
// export, bin, main_package.
Form string
// Name is the declared name (script key, bin key, export subpath, or
// package path for Go main packages).
Name string
// Target is the raw declared target: "pkg.mod:func" for Python scripts,
// a file path for npm entries.
Target string
}
EntryPoint is one manifest-declared entry point.
type Manifest ¶
type Manifest struct {
Lang vocab.Lang
// Path is the manifest file path relative to the workspace root.
Path string
// Name is the manifest-declared package name (the registry name):
// pyproject [project.name], package.json name. Empty for go.mod.
Name string
// GoModulePath is the module path from go.mod (Go only).
GoModulePath string
Deps []DeclaredDep
EntryPoints []EntryPoint
}
Manifest is one language's manifest within a member.
func ParseGoMod ¶
ParseGoMod parses a go.mod at relPath (workspace-root-relative): module path and require directives (all runtime scope — Go has no dev-dependency concept in go.mod). Also used by the Go extractor for nested modules within a member.
type Member ¶
type Member struct {
// Name is the workspace member name ("_" for single-project scans).
Name string
// Path is the member root relative to the workspace root ("." allowed).
Path string
Library bool
DevOnly bool
Releasable bool // belongs to a releasable group (published externally)
// ImportName is the explicit Python import-name override from
// workspace.toml (resolution order step 3).
ImportName string
// RegistryNameOverride is workspace.toml's registry_name, when set.
RegistryNameOverride string
// LintAllow is the per-member allow list for library-forbidden-imports.
LintAllow []string
// Manifests maps each language present in the member to its manifest.
Manifests map[vocab.Lang]*Manifest
}
Member is one workspace member (or the synthesized single-project member).
type Workspace ¶
type Workspace struct {
// Root is the absolute workspace root.
Root string
// Single is true for single-project scans (no workspace.toml).
Single bool
// Members in workspace declaration order (single synthesized member for
// single-project scans).
Members []*Member
}
Workspace is the loaded analysis input.
func Load ¶
Load reads the workspace at root. A missing workspace file means single-project mode; a malformed one is a hard error.
func (*Workspace) MemberByName ¶
MemberByName returns the named member, or nil.