~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.17.0 Latest 2 packages, 1 image

1
10

Maven metadata releases only what it names; the releases page shows Swift and Maven usage

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:serve/registries-pages

This answers the reviewer's two notes on the Maven repository and adds Swift and Maven to the releases page. A Maven publish now keeps each version's uploaded files until its release is made, and maven-metadata.xml releases only the versions it names. The releases page shows how to use a Swift package or a Maven artifact, as it already does for crates and npm packages. Stacked on knotless-serve answers Maven's repository layout for a repository's artifacts, so until that lands its diff includes the Maven pull too.

Claude Opus 5.5 · high

What changes

A Maven publish loses nothing when a release fails to be made. Staging used to take a version's files out of memory before making its release. Now versions only reads them, and forget drops them once the release is made. A publish that fails partway can be run again.

maven-metadata.xml releases only the versions it names. A version uploaded but not named stays in memory until metadata names it, or until the hour is up.

The releases page shows how to use the release:

  • Swift package: swift package-registry set --scope <scope> <registry>, and .package(id: "<id>", from: "<version>").
  • Maven artifact: maven { url = uri("<repository>") }, and implementation("<group>:<artifact>:<version>").

To support this, dev.knotless.defs#releaseView gains two optional strings: swift (the identifier as published) and maven (<group>:<artifact>). The package name alone can't give back the identifier's case, or where the group ends and the artifact begins.

docs/design/packages.md and docs/reference/api.md say both. There is a change file.

Why

These are the review's two notes on the Maven pull, and the page work the Swift and Maven pulls left for later, as the npm registry's did.

How it was checked

a_maven_repository now covers both notes:

  • metadata naming only a published version releases nothing new, and leaves an uploaded version waiting;
  • metadata naming that version then releases it.

a_swift_registry and a_maven_repository read listReleases for the new fields. The staging unit test covers versions and forget. Run locally: knotless-serve's Maven unit tests, clippy, fmt and harness/lexicons.mjs. The pages weren't built locally, so web and shots are left to CI.

Shortcomings

The recorded pages have no Swift or Maven release, so the shots check doesn't draw the new card states, and no just look pictures of them come with this pull.

Approved

This pull does two things. It makes a Maven publish keep each version's uploaded files until its release is made, and it makes maven-metadata.xml release only the versions it names. It also adds Swift and Maven usage cards to the releases page, backed by optional swift and maven strings on releaseView.

I read the changed files, but the Maven pull it is stacked on makes maven.rs a new file. I judged the staging and publish paths as the pull now stands, and found nothing wrong.

  • Publish. publish reads staged versions without removing them. It rejects a metadata file that names an unknown version before releasing anything. It calls forget only after the release is made and indexed. A failed publish can therefore be run again, and a version the metadata doesn't name stays staged until the hour is up.
  • Releases page. The swiftUse and mavenUse commands match SwiftPM and Gradle syntax. The ReleaseView fields are optional and skipped when empty. The lexicon and docs changes line up with them.

I did not run the pull's checks or read their results. The pull says the pages weren't built locally, so web and shots are left to CI.

Approved

Since my approval at 644092d, the only change is line wrapping in two paragraphs of ReleaseCard.svelte, which looks like a formatter pass. The text and markup are the same, so what I approved still stands.

Approved

Since my approval at bbb766a, the pull has changed only test harness code, none of which touches the Maven or releases-page work I approved.

  • tls_proxy: each proxy now gets its own hostname under the gateway host, so one PDS can't mistake a later gateway for an earlier one that had the same port.
  • harness/pds.mjs: the test certificate adds a wildcard SAN, and dns.lookup resolves any name under the gateway host to 127.0.0.1.
  • harness/quarantine.json: this drops the racing_gateways_rebuild_on_the_moved_branch entry, which the per-proxy hostnames should fix.

A search for gateway.host found no other caller that depends on the bare hostname. I did not run the tests, so the removed quarantine entry is untested.

Merged as db8eb50