Skip to content

Add publish-candidate target for Hackage pre-release verification#77

Merged
rjrodger merged 2 commits into
mainfrom
claude/haskell-hackage-release-il6dzc
Jul 3, 2026
Merged

Add publish-candidate target for Hackage pre-release verification#77
rjrodger merged 2 commits into
mainfrom
claude/haskell-hackage-release-il6dzc

Conversation

@rjrodger

@rjrodger rjrodger commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new make publish-candidate target to the Haskell port's release workflow, allowing maintainers to verify package metadata, Haddock rendering, and dependency bounds on Hackage before committing to a permanent release.

Changes

  • Makefile: Added publish-candidate phony target that uploads a non-permanent candidate package to Hackage for verification before the one-way make publish step

    • Candidate uploads are changeable and removable, unlike permanent releases
    • Includes version validation (matches VERSION file with .cabal file)
    • Supports dry-run mode with AQL_DRY_RUN_FILLER token
    • Outputs candidate URL for easy access: hackage.haskell.org/package/voxgig-struct-X.Y.Z/candidate
  • AGENTS.md: Documented the Hackage release workflow

    • Explains the candidate-first approach and why it's necessary (permanent nature of Hackage uploads)
    • Provides step-by-step release instructions
    • Documents token requirements and dry-run behavior
    • Notes PVP dependency bound requirements and cabal gen-bounds usage

Implementation Details

The publish-candidate target:

  • Runs tests first (same as publish)
  • Validates version consistency between VERSION and .cabal files
  • Builds the source distribution with cabal sdist
  • Uploads via cabal upload --token (candidate mode is implicit)
  • Respects dry-run mode when test tokens are present in environment
  • Does not create git tags (unlike permanent publish)

https://claude.ai/code/session_01MVWKoYVQAaRXi7TcggYnG2

claude added 2 commits July 3, 2026 15:42
Add a make publish-candidate target that uploads a Hackage package
candidate (changeable/removable) so the package page, dependency bounds,
and Haddock rendering can be verified before the permanent make publish.
Reuses the same version-match and aql dry-run guards as publish.

Document the release process in haskell/AGENTS.md: candidate-first flow
(Hackage uploads are permanent), token requirements, and the PVP bounds
rule (lower AND upper on every unique dep, declared once).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MVWKoYVQAaRXi7TcggYnG2
Documentation (Hackage readiness): add a module header with an overview and
example, and a Haddock comment on every exported item (functions, value/type
declarations, Value constructors, and the Inj/InjDef record fields). Haddock
coverage goes from 0% to 100% (203/203) with no out-of-scope link warnings.

Warnings: the library now compiles clean under -Wall.
- drop the unused Data.Maybe(isJust) import
- rename locals that shadowed the top-level items/pad (-> elems/padStr)
- annotate the list-index arithmetic in walk as Int (-Wtype-defaults)
- make the unterminated-backtick case in injectionPartialReplace a catch-all
  so the match is exhaustive (behaviour unchanged)

Comment/rename-only changes to source; no API, signature, or export changes.
make test (1329 pass), cabal check, and check_parity.py all remain green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MVWKoYVQAaRXi7TcggYnG2
@rjrodger rjrodger merged commit 3387333 into main Jul 3, 2026
123 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.

2 participants