Skip to content

Depend on invopop/at instead of carrying a copy - #3

Merged
samlown merged 1 commit into
mainfrom
refactor/at-package
Aug 3, 2026
Merged

Depend on invopop/at instead of carrying a copy#3
samlown merged 1 commit into
mainfrom
refactor/at-package

Conversation

@samlown

@samlown samlown commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The at package moves out to invopop/at (v0.1.0) and this library depends on it.

Why

It was here for historical reasons, which had two costs. Anything wanting millisecond timestamps had to depend on a CouchDB library to get them. And there were two structurally identical but distinct copies in circulation — couch/at and lib/at — so a model built on one could not satisfy an interface declared with the other. In access that meant every model being archived had to be wrapped to convert between them, which is the kind of hack that ends up load-bearing.

invopop/lib drops its copy in the same round (lib#32), so there is now one Timestamp type.

What changed

couch/at is deleted and model.go imports github.com/invopop/at. Same code, same behaviour, same JSON — the tests moved upstream with the implementation.

Breaking

Importers of github.com/invopop/couch/at need github.com/invopop/at. The type is identical, only the path changes. Wants a minor tag, since v0.2.0 consumers won't compile against it.

Known importers: access (updated on refactor/migrate-couch, access#279). gobl-net and gobl.lookup use couch but not couch/at.

Testing

Build, full suite and golangci-lint pass. README updated to point at the new home.

🤖 Generated with Claude Code

The at package moves to github.com/invopop/at. It was here for historical
reasons, which meant anything wanting millisecond timestamps had to depend
on a CouchDB library, and left two structurally identical but distinct
copies in circulation (couch/at and lib/at) that callers had to convert
between at package boundaries.

Breaking for importers of couch/at: the import path changes, the type does
not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@samlown
samlown merged commit 74e4506 into main Aug 3, 2026
2 checks passed
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.

1 participant