Adopt build conventions - #16
Merged
Merged
Conversation
Introduce `@version` and `@source_url` as the single sources of truth, allow CI to inject a pre-release version via `VERSION_OVERRIDE`, and add the `precommit` alias plus `preferred_envs` so validation runs through a single gate. Add credo, publisho and a default `.credo.exs`, and bump ex_doc to 0.39. Raise the minimum Elixir to 1.18, one minor below the 1.19.5 used for tooling. Pin the packaged file list explicitly, move the description up to `project/0`, and add `maintainers` and a `source_ref` pinned to `@version` so generated docs link at the released tag. Co-Authored-By: Claude <noreply@anthropic.com>
Drop the parentheses from the zero-arity definitions, remove a redundant blank line, and call the config provider directly rather than through `apply/3` — the function name and arity are known, only the module varies. No behaviour change; this is what the new `credo --strict` gate in `mix precommit` asks for. Co-Authored-By: Claude <noreply@anthropic.com>
The generated test called a function that has never existed, so `mix test` failed outright and could not serve as a gate. Reduce the file to a `doctest` stub. This does not give Castle test coverage. Every function here drives `:release_handler` against an installed release and `generate/1` resolves paths from `:code.root_dir()`, so exercising any of it needs a release fixture booted in a workspace, as Forecastle's `:e2e` suite does. Issue #8 stays open for that. Refs: #8 Co-Authored-By: Claude <noreply@anthropic.com>
The organisation's build components are GitLab CI components and do not apply to this repository, so mirror the pipeline Forecastle uses: a precommit job on the preferred toolchain, and a test matrix across the supported Elixir and OTP range. The matrix is Linux-only for now. Castle is pure Elixir talking to `:release_handler`, with no shell scripts of its own since 0.3.0 and no suite that boots a release, so there is nothing platform-sensitive to run; macOS is worth adding alongside the fixture from #8. Until then the matrix earns its keep on the deprecation surface, which matters for code that reaches into OTP release internals. Publishing triggers on bare semver tags, as produced by `mix publisho`, and refuses to publish if the tag and `@version` disagree. It needs a `HEX_API_KEY` repository secret. Also ignore `.DS_Store`, which was untracked and unignored. Co-Authored-By: Claude <noreply@anthropic.com>
Add `AGENTS.md` describing what Castle does, how it pairs with Forecastle, and the conventions for working on it, with `CLAUDE.md` as a wrapper that imports it. Record the known limitations and the open issues tracking them, so they are not rediscovered. Add `RELEASE.md` for next-release notes, carrying the raised Elixir requirement — the only consumer-visible change on this branch. Give `CHANGELOG.md` a Keep a Changelog preamble and the `<!-- %% CHANGELOG_ENTRIES %% -->` placeholder that `mix publisho` folds entries into. Existing entries are left as published. Co-Authored-By: Claude <noreply@anthropic.com>
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Brings Castle onto the organisation's Elixir build conventions, mirroring the
structure Forecastle adopted in ausimian/forecastle#5.
mix.exs
@versionand@source_urlas the single sources of truth, withVERSION_OVERRIDEso CI can inject a pre-release version.precommitalias pluspreferred_envs, so validation runs through a singlegate rather than piecemeal checks.
.credo.exs, and ex_doc bumped to 0.39.project/0, andsource_refpinned to@versionso generated docs link at the released tag.CI
The organisation's build components are GitLab CI components and do not apply
here, so the pipeline mirrors Forecastle's: a precommit job on the preferred
toolchain, and a test matrix over the supported Elixir and OTP range
(1.18/27, 1.19/27-28, 1.20/27-29).
The matrix is Linux-only for now — Castle is pure Elixir talking to
:release_handler, with no shell scripts of its own since 0.3.0 and no suitethat boots a release, so there is nothing platform-sensitive to run. Until
there are tests, the matrix earns its keep on the deprecation surface, which
matters for code reaching into OTP release internals.
Publishing triggers on bare semver tags, as produced by
mix publisho, andrefuses to publish if the tag and
@versiondisagree.Note
The publish workflow needs a
HEX_API_KEYrepository secret. This has nowbeen set on the repository.
Source changes
credo --strictfindings only, no behaviour change: parentheses dropped fromthe zero-arity definitions, a redundant blank line removed, and the config
provider called directly rather than through
apply/3— the function name andarity are known, only the module varies.
Tests
mix testfailed before this branch: the generated test asserted onCastle.hello/0, which has never existed, so there was no working gate toadopt. It is now a
docteststub.This does not give Castle test coverage, and #8 stays open. Every function
here drives
:release_handleragainst an installed release, andgenerate/1resolves paths from
:code.root_dir(), so exercising any of it needs a releasefixture booted in a workspace, as Forecastle's
:e2esuite does. Forecastle'supgrade_test.exscovers this code end to end in the meantime.Docs
AGENTS.mddescribes what Castle does, how it pairs with Forecastle, and theconventions for working on it, with
CLAUDE.mdimporting it. It records theknown limitations and the issues tracking them (#8, #9, #10, #11) so they are
not rediscovered.
RELEASE.mdcarries the raised Elixir requirement, the onlyconsumer-visible change here.
CHANGELOG.mdgains the publisho placeholder;existing entries are left as published.
Refs: #8