fix: a mark is not a substitute for a docstring, and the docs examples now run - #10
Open
sotashimozono wants to merge 1 commit into
Open
fix: a mark is not a substitute for a docstring, and the docs examples now run#10sotashimozono wants to merge 1 commit into
sotashimozono wants to merge 1 commit into
Conversation
…s now run Two findings from the registration review, both still live. **1. A marked public name with no docstring passed the audit clean.** Measured before changing anything: a module with `@experimental "shape not settled" marked_only(x) = x` and no prose reported `unaccounted = Symbol[]`. That is the looser practice the review objected to, and the objection was narrow and correct — the design itself was called "a perfectly fine idea". `Audit` gains `undocumented`: public, own, no docstring, mark or not. `test_surface` asserts that empty, so a marked name with no prose fails exactly as an unmarked one does. `unaccounted` survives as the stricter subset — neither account at all. There is deliberately no `require_docstring` switch, though the spec asked for one. A knob that turns the rule off wholesale is the thing being objected to; `skip` is the escape, and it is per-name, visible, and can only shrink. The spec entry was rewritten to assert that no such kwarg exists rather than deleted. The `Clean` fixture in `test_ext.jl` stopped being clean, because it had the mark and no prose. The fixture moved, not the rule. **2. The trailing-backslash line continuations were never fixed.** Reported in the review on 2026-09-02, in eleven places; eight were still there today, unchanged since the initial commit — #4 did not touch them. Reproduced verbatim: `ArgumentError: @experimental: nothing to mark`. All eight now use the parenthesised call form, which is checked to work for both the attached and the name-list subject. The review suggested `jldoctest` as the guard. It would not have caught this: `\` parses as left-division, so the block is syntactically valid and fails only at macro expansion. The guard added instead is a lint over every ```julia fence in the README, `docs/src/` and `src/` — for the character. Confirmed by reintroducing one and watching it report `README.md:126`. `docs/src/adopting.md` framed the two accounts as a choice ("it is settled → write the docstring; it is not → say so"). It now says the docstring is owed either way. Suite: 537 pass, 149 broken. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
📚 Docs preview: https://codes.sota-shimozono.com/ExperimentalAPI.jl/previews/PR10/ (updates on each push to this PR) |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 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.
Two findings from the registration review, both still live in
mainuntil this lands.1. A marked public name with no docstring passed the audit clean
Measured before changing anything:
That is the looser practice the review objected to, and the objection was narrow and correct — the design itself was called "a perfectly fine idea". The only thing being argued against was letting a mark stand in for prose.
Auditgainsundocumented: public, own, no docstring, mark or not.test_surfaceasserts that empty, so a marked name with no prose fails exactly as an unmarked one does.documenteddeclaredundocumentedtest_surfaceasserts emptyunaccountedundocumentedThere is deliberately no
require_docstringswitch, thoughtest/spec/asked for one. A knob that turns the rule off wholesale is the thing being objected to.skipis the escape: per-name, visible, and it can only shrink. The spec entry was rewritten to assert no such kwarg exists rather than deleted.The
Cleanfixture intest_ext.jlstopped being clean, because it carried the mark and no prose. The fixture moved, not the rule.2. The trailing-backslash continuations were never fixed
Reported in the review on 2026-09-02 in eleven places. Eight were still there, unchanged since the initial commit — #4 did not touch them. Reproduced verbatim:
All eight now use the parenthesised call form, checked to work for both the attached definition and the name-list subject:
The review suggested
jldoctestas the guard. It would not have caught this:\parses as left-division, so the block is syntactically valid and fails only at macro expansion — a doctest would have had to run it, and most blocks reference aMyPackagethat does not exist. The guard added instead is a lint over every ```julia fence in the README,docs/src/and `src/`, for the character itself. Confirmed by reintroducing one and watching it report `README.md:126`.The one remaining trailing
\is insrc/release.jl, inside a triple-quoted string, where it is a legitimate string continuation.Also
docs/src/adopting.mdframed the two accounts as a choice — "it is settled → write the docstring; it is not settled → say so". It now says the docstring is owed either way, and the mark is what a docstring cannot carry: a machine reads it, so a run that goes through the name says so.Suite: 540 pass, 149 broken, 0 failing.
🤖 Generated with Claude Code