Skip to content

build: crates.io pages had broken links, and crates carried test data - #131

Merged
jamesconwaydev merged 1 commit into
mainfrom
packaging
Nov 20, 2026
Merged

jamesconwaydev merged 1 commit into
mainfrom
packaging

Conversation

@jamesconwaydev

Copy link
Copy Markdown
Collaborator

Problem

  • Each crate's crates.io page renders the root README.md. Its header image and its links to ROADMAP.md, CONTRIBUTING.md, LICENSE and NOTICE were relative, so they were broken there.
  • The published crates carried test data that no build needs: parsec-html-core its tree-construction, selector and shadow DOM suites, parsec-xpath its libxml2 cases, parsec-html-css the webref data its property tables are generated from.
  • The curl command in SECURITY.md for checking a crate's checksum gets a 403 from crates.io, which refuses requests without a user agent.

Change

  • The README's image and those four links are absolute GitHub URLs.
  • exclude = ["tests/"] for parsec-html-core and parsec-xpath, and data/ added to parsec-html-css's. In the two crates synced from Netweir only Cargo.toml changes; the sync script copies their src, tests and the like, not the manifest, so the drift check is unaffected.
  • SECURITY.md's command passes -A with a placeholder contact.
  • Two CI steps in the reproducible job: no package's file list has a tests/ or data/ path, and README.md has no relative link or image.
  • The PARSEC_VERSION macro for parsec.h is in fix(capi): spans pointed past text that wasn't UTF-8 #129 with the other header changes.

Tests

  • cargo package --list -p <crate> for every published crate: no tests/ or data/ files (parsec-html-core now 30 files, parsec-xpath 12, parsec-html-css 44).
  • cargo package --workspace --exclude parsec-capi builds every crate from its package, as cargo publish would.
  • Both CI checks run clean on this branch, and actionlint passes.
  • The new curl command returns the 0.1.0 checksum. Without -A it returns nothing.

Every crate's crates.io page is README.md, and its header image and its
links to ROADMAP, CONTRIBUTING, LICENSE and NOTICE were relative to the
repository, so they 404'd there. They're absolute now, and CI fails on
a relative one.

parsec-html-core shipped its tree-construction, selector and shadow DOM
suites, parsec-xpath its libxml2 cases, and parsec-html-css the webref
data its tables are generated from: none of it is needed to build.
Each excludes them, and CI fails if a package holds tests/ or data/.
Only the manifests change in the two crates synced from Netweir; the
sync copies their sources, not their Cargo.toml.

SECURITY.md's curl to crates.io got a 403: crates.io wants a user agent
that says who's asking.

@foothillsdigital foothillsdigital left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked d09becd:

  • Package lists: cargo package --list --locked for every crate but parsec-capi has no tests/ or data/ path, which is the new CI step run locally. parsec-html-core, parsec-html-css and parsec-xpath each package and verify (cargo package --locked, exit 0), and nothing in their src include_str!s or include_bytes!s from the excluded folders. Excluding tests/ whole also keeps the html5lib submodule's presence from changing the package, as before.
  • Netweir drift: sync-from-netweir.sh copies src examples scripts fuzz/fuzz_targets tests/css.rs tests/tokenizer.rs tests/tree.rs, never Cargo.toml, so the manifest changes to the two synced crates don't touch the drift check.
  • The README: no relative link or image is left, reference-style ones included (^\[..\]: [^h]), and the new CI grep passes.
  • SECURITY.md: crates.io returns 403 to curl's default user agent and to an empty one. With -A it returns the checksum (1d12b658… for 0.1.0).
  • CI: all 33 checks pass.

Approving.

@jamesconwaydev
jamesconwaydev added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 783f272 Nov 20, 2026
33 of 35 checks passed
@jamesconwaydev
jamesconwaydev deleted the packaging branch November 20, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants