docs: document core public API and guard it with deny(missing_docs) - #586
Open
sshaplygin wants to merge 1 commit into
Open
docs: document core public API and guard it with deny(missing_docs)#586sshaplygin wants to merge 1 commit into
sshaplygin wants to merge 1 commit into
Conversation
Around 470 public items in the crate have no rustdoc. Start with the types every user of the SDK touches - errors, result sets and rows, the `Credentials` and `Waiter` traits - and add `#[deny(missing_docs)]` to those four modules so the documented surface cannot regress. Documented: `YdbOrCustomerError::to_ydb_error`, the `YdbIssueSeverity` variants, the `YdbIssue` code/message fields, `ResultSet` and its `rows`/`is_truncated`, `Row` and both `remove_field*` methods, `ResultSetRowsIter`, `TokenInfo`, `Credentials` with both trait methods, and `Waiter::wait`. The remaining modules stay unguarded; they can be converted one at a time by the same pattern. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #586 +/- ##
==========================================
- Coverage 86.91% 86.85% -0.06%
==========================================
Files 198 198
Lines 19492 19492
==========================================
- Hits 16941 16930 -11
- Misses 2551 2562 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rekby
requested changes
Aug 13, 2026
| #[default] | ||
| Fatal, | ||
|
|
||
| /// The operation failed. |
Member
There was a problem hiding this comment.
Тут непонятно различие между этими двумя ошибками. И в fatal и в error - операция дальше не продолжается.
| pub struct YdbIssue { | ||
| /// Server-defined issue code | ||
| /// | ||
| /// More stable than the message - prefer it for programmatic checks. |
Member
There was a problem hiding this comment.
На эти коды тоже нельзя полагаться в общем случаи. Они более стабильны, чем текст. Но гарантии их стабильности и неизменности на конкретных сценариях нет. Это низкоуровневые штуки, больше для диагностики. И общая рекомендация - не завязываться на них.
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.
Problem
Building with
-W missing_docsreports roughly 470 undocumented public items, spread across most modules. docs.rs therefore shows bare signatures for types users touch on their first query.Change
Start with the core surface and make it non-regressable:
errors.rs—YdbOrCustomerError::to_ydb_error, the fiveYdbIssueSeverityvariants, theYdbIssueissue_code/messagefields.result.rs—ResultSetand itsrows/is_truncated,Rowand bothremove_field*methods,ResultSetRowsIter.pub_traits.rs—TokenInfo,Credentialsand both trait methods. The existing implementation notes oncreate_token(caching, background renewal, behaviour while renewal fails) were plain//comments invisible on docs.rs; they are now rustdoc, with the originals kept in place.waiter.rs—WaiterandWaiter::wait.Then
#[deny(missing_docs)]on those four module declarations inlib.rs, so the documented surface cannot regress.The other modules stay unguarded and can be converted one at a time by the same pattern — the largest remaining are
client_topic/list_types.rs(72 items),client_topic/client.rs(46) andtable_requests.rs(41).Verification
-W missing_docsreports 0 remaining warnings in the four modules.error: missing documentation for a method.cargo docreports 17 broken links crate-wide, all pre-existing and all in other modules (10 inclient_query/builders.rs).cargo fmt --check, clippy-D warnings,cargo test --workspaceandcargo test --docall pass.🤖 Generated with Claude Code