Ships the README-linked guides in the package and quiets the two JSON references - #230
Merged
Merged
Conversation
hex.pm renders the package page from the README inside the tarball, so a relative README link resolves to that path in the tarball and answers 404 unless the file ships. The README links relatively to ten docs files, all extras and none in package files; each is now in package: [files: ...], so one relative link works on GitHub, HexDocs and hex.pm alike. The comments in package/0 and docs/0 said docs/ was deliberately left out because HexDocs builds from disk; that missed the hex.pm README preview, and both now give the reason the guides ship. The conformance exclusions (the files list's lib/predicator* glob with exclude_patterns) are unchanged. The language reference named predicator's own JSON.parse and JSON.stringify in Elixir's arity form, which ExDoc autolinks against Elixir's JSON module and reports undefined. They are now written in call form, JSON.parse(string) and JSON.stringify(value), as the function table above them already writes them, so nothing autolinks and no skip_code_autolink_to entry is needed. mix docs --warnings-as-errors now exits 0. No version bump; no changelog fragment, since changelog.d/README.md excludes documentation and quality gate changes. Refs: px-i0dj
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
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.
Bead: px-i0dj
What changes
package: [files: ...]. Each is now infiles:, so one relative link works on GitHub, HexDocs and hex.pm alike.package/0said docs/ was deliberately excluded anddocs/0said extras need no entry infiles:, both because HexDocs builds from disk; that missed the hex.pm README preview. Both now state it. The rest of docs/ (for exampledocs/reference/ast.md, an extra the README does not link) stays out of the tarball.docs/reference/language.mdnamed predicator's ownJSON.parseandJSON.stringifyin Elixir's arity form, which ExDoc autolinks against Elixir'sJSONmodule and reports undefined. They are now written in call form,JSON.parse(string)andJSON.stringify(value), matching the function table directly above them. Noskip_code_autolink_toentry was added.exclude_patterns: [~r{\Alib/predicator/conformance/}], thelib/predicator*glob),@version(9.4.2),test/docs_adr_links_test.exsandtest/predicator/conformance/package_boundary_test.exs(both green in the gate run below). No changelog fragment:changelog.d/README.mdlists "documentation, ADRs, or plans" and "quality gate, CI, or agent tooling changes" under "Do not write a fragment for".The warning set at the base this branch was cut from matched the bead exactly (the two JSON references, each printed for html and epub); nothing moved.
Acceptance evidence
mix docs --warnings-as-errors(branch head)No warnings.
Relative links in published files (rules 1 and 6)
The check reads
extrasandpackage: [files: ...]fromMix.Project.config(), scans every extra and everylib/**/*.ex(moduledocs and docs) for inline markdown links that are nothttp(s):,mailto:, a fragment or an ExDoce:/m:/c:/t:form, resolves each against the file it appears in, and reports any target that is not an extra; then it checks every README relative target againstfiles:andextras.check script (ruby, run from the repo root)
Output:
Reference-style link definitions and raw
href=attributes pointing at a relative path, checked separately withgrep -rnE '^\s*\[[^]]+\]:\s' ... | grep -vE '\]:\s*(https?:|#)'andgrep -rnoE 'href="[^"#:]+"' ...over the same files: both empty (grep exit 1).README link targets against
package: [files: ...]andextrasThe eleven distinct targets are the ten docs files this PR adds plus
LICENSE, which was already in both.mix hex.build(file list, tarball deleted afterwards)lib/predicator/conformanceappears as a bare directory entry with no files under it, exactly as on main:exclude_patternsstill removes the generator modules.Full gate,
mix quality(quoted whole)The commit's tree is byte-identical (
git write-treebefore and aftergit commit) to the staged tree this gate ran green on, so the commit was made directly on that run.git diff --stat origin/mainReview (in-turn)
Tier: gate. The diff is 40 changed lines in
mix.exsand one guide; it adds no public function, module, option or callback, changes no wire shape or corpus file, and moves no behaviour a record cites (the package file list is packaging, not an API a host codes against). I re-read the diff against the bead and its acceptance criteria. Each doc claim was checked against the code: the call formsJSON.parse(string)andJSON.stringify(value)are the ones the function table at the top of the section already uses; the newpackage/0comment's claims (every README relative target ships; each is an extra; the rest of docs/ stays out) match thefiles:list, theextraslist and the README scan above; thedocs/0comment's claim that extras are read off disk at publish time matches the unchanged extras list and the hex.build listing (which showsdocs/reference/ast.md, an extra, absent from the package). The conformance paragraph of thepackage/0comment kept its content; only its opening changed from "on the same principle" to a standalone "because", since the principle it referred to was the one being rewritten.Provenance
package/0's comment were re-worded (see above); the bead named only the docs/ sentence, but that paragraph opened by pointing back to it.skip_code_autolink_toentries: both are predicator language functions, not Elixir functions, and the call form is how the rest of the section names them.