Open
Conversation
The monolithic spfs::Error enum had 47 variants covering everything from runtime management to object storage to serialization. This makes it difficult for callers to reason about which errors can actually occur in a given context. This change extracts the 13 runtime-related variants into a new crate::runtime::error::Error type, following the existing pattern used by encoding::Error and graph::ObjectError. The new type is included in the root Error via a #[from] conversion, so existing code that propagates errors with `?` continues to work unchanged. Variants moved: - NothingToCommit, NoActiveRuntime, RuntimeNotInitialized - UnknownRuntime, RuntimeExists, RuntimeUpperDirAlreadyInUse - DoesNotSupportDurableRuntimePath, RuntimeAlreadyEditable - RuntimeReadError, RuntimeWriteError, RuntimeSetPermissionsError - CouldNotCreateSpfsRoot, RuntimeChangeToDurableError This is the first step toward more granular error types across the spfs API surface. Signed-off-by: Ryan Bottriell <rbottriell@ilm.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Ryan Bottriell <rbottriell@ilm.com> Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Ryan Bottriell <rbottriell@ilm.com> Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Ryan Bottriell <rbottriell@ilm.com>
This is the first phase of incrementally enabling the deny(missing_docs) lint across the workspace. This PR: Phase 0 - Infrastructure: - Add workspace-level warn(missing_docs) lint to Cargo.toml - Add #![allow(missing_docs)] for generated code in spfs-proto and spfs proto module Phase 1 - Document utility and CLI crates: - Add crate-level documentation to: - is_default_derive_macro - parsedbuf - sentry-miette - spk-schema/tera - spfs-cli/common - All spk-cli command crates (cmd-*, group*) This reduces the missing documentation warnings while keeping the lint as a warning to allow incremental progress. Upcoming phases will document the remaining crates: - Phase 2: spk-solve sub-crates, spk-config, spk, spfs-cli/main - Phase 3: spk-cli/common, spk-solve, spk-build - Phase 4: spk-solve/graph, spk-exec, spk-storage - Phase 5: spk-schema, spk-schema/foundation, spfs (large crates) - Phase 6: Change workspace lint from warn to deny Signed-off-by: Ryan Bottriell <rbottriell@ilm.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: docs: enable missing_docs lint (phase 1)
Branch:
docs/missing-docs-phase-1PR URL: https://github.com/spkenv/spk/pull/new/docs/missing-docs-phase-1
Summary
This is the first phase of incrementally enabling the
deny(missing_docs)lint across the workspace. The goal is to improve API documentation while keeping merge requests accessible for review.Phase 0 - Infrastructure (this PR)
warn(missing_docs)lint toCargo.toml#![allow(missing_docs)]for generated code (FlatBuffers/protobuf) in:spfs-proto/src/lib.rsspfs/src/proto/mod.rsPhase 1 - Document utility and CLI crates (this PR)
Added crate-level and module documentation to:
is_default_derive_macro- derive macro for IsDefault traitparsedbuf- validated string wrapper macrosentry-miette- sentry integration for miette errorsspk-schema/tera- template rendering with teraspfs-cli/common- shared CLI argument structuresspk-clicommand crates (cmd-*,group*)Upcoming Phases
This is the first of several PRs to fully enable the lint:
warntodenyEach subsequent phase will be a separate PR targeting ~100-150 documentation items to keep reviews manageable.
Test Plan
cargo check --workspacesucceeds with warnings (not errors)#![allow(missing_docs)]Changes Summary
Files Changed
Infrastructure
Cargo.toml- Addedmissing_docs = "warn"to workspace lintscrates/spfs-proto/src/lib.rs- Added crate docs and#![allow(missing_docs)]crates/spfs/src/proto/mod.rs- Added#![allow(missing_docs)]for generated codeUtility Crates
crates/is_default_derive_macro/src/lib.rscrates/parsedbuf/src/lib.rscrates/sentry-miette/src/lib.rscrates/spk-schema/crates/tera/src/error.rsSPFS CLI
crates/spfs-cli/common/src/lib.rscrates/spfs-cli/common/src/args.rsSPK CLI Commands
crates/spk-cli/cmd-build/src/lib.rscrates/spk-cli/cmd-convert/src/lib.rscrates/spk-cli/cmd-debug/src/lib.rscrates/spk-cli/cmd-du/src/lib.rscrates/spk-cli/cmd-env/src/lib.rscrates/spk-cli/cmd-explain/src/lib.rscrates/spk-cli/cmd-install/src/lib.rscrates/spk-cli/cmd-make-binary/src/lib.rscrates/spk-cli/cmd-make-recipe/src/lib.rscrates/spk-cli/cmd-make-source/src/lib.rscrates/spk-cli/cmd-render/src/lib.rscrates/spk-cli/cmd-repo/src/lib.rscrates/spk-cli/cmd-test/src/lib.rscrates/spk-cli/group1/src/lib.rscrates/spk-cli/group2/src/lib.rscrates/spk-cli/group3/src/lib.rscrates/spk-cli/group4/src/lib.rs