Skip to content

Toolchain refresh: flake package with tested builds, gems4nix, Ruby 3.4, rubocop-clean - #15

Merged
nz merged 6 commits into
mainfrom
chore/toolchain-refresh
Aug 7, 2026
Merged

Toolchain refresh: flake package with tested builds, gems4nix, Ruby 3.4, rubocop-clean#15
nz merged 6 commits into
mainfrom
chore/toolchain-refresh

Conversation

@nz

@nz nz commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

  • README rewritten for the current API (Option/Result combinators, type assertions, Rails integration) — it still had bundle gem template TODOs.
  • CONTRIBUTING.md added, documenting the development methodology and the layered test gate.
  • Nix: the gem is now a flake package (nix build .#errgonomic) whose checkPhase runs the full rake suite, and checks reuses the packages so nix flake check certifies build + tests. Gem management moves from bundix/gemset.nix to gems4nix reading Gemfile.lock directly (regenerated with CHECKSUMS + precompiled platform variants). A committed gem-groups.json avoids the group-inference IFD so all four systems evaluate from one machine (rake gems4nix:groups regenerates it). nixpkgs bumped to nixos-26.05 (Ruby 3.4).
  • CI tracks the latest Ruby 3.4.x, matching the flake.
  • delegate_optional honors private: (was accepted for Rails-delegate parity but silently ignored) — implemented test-first.
  • Rubocop clean: doc comments on all errgonomic-owned classes, mechanical fixes, and config exemptions with written rationale for the deliberate designs (capitalized Some/Ok constructors, combinator class size, doctest lines, vendored core_ext).

Test plan

  • bundle exec rubocop — 16 files, no offenses
  • bundle exec rake — 4 unit runs / 8 assertions, 59 doctest runs / 147 assertions, all green
  • nix flake check — package builds, suite passes in checkPhase
  • nix flake check --all-systems — all four systems evaluate

nz added 6 commits July 23, 2026 10:55
The README still carried bundle-gem template TODOs. Document the
installed reality: presence and blank helpers, type assertions, Option
and Result combinators, pattern matching, serialization refusal, and
the Rails integration. Examples mirror the YARD doctests.
TDD red-green-refactor, the layered test gate ladder (rubocop and the
suite per edit, nix build and flake check before push, CI green after),
commit and comment conventions, and correct > simple > performant.
nix build .#errgonomic builds the gem as a derivation and runs the full
rake suite (unit tests + doctests) in its checkPhase; checks reuse the
packages so nix flake check certifies build and tests together.

Gem management moves from bundix/gemset.nix to gems4nix, which reads
Gemfile.lock directly. The lockfile is regenerated with the CHECKSUMS
section and precompiled platform variants gems4nix requires. The
committed gem-groups.json keeps evaluation pure (no Ruby IFD) so all
four target systems evaluate from one machine; rake gems4nix:groups
regenerates it. nixpkgs moves to nixos-26.05 (Ruby 3.4).
setup-ruby resolves "3.4" to its newest patch release, matching the
Ruby pinned by the flake. A support matrix down to a minimum Ruby can
slot into the same list later.
The keyword existed for parity with Rails' delegate but was silently
ignored; the generated delegation method is now private when requested.
Fix what improves the library: doc comments on every errgonomic-owned
class and module, alias over alias_method, frozen string literals,
super() in Some#initialize, and the overlong gemspec line.

Exempt what is deliberate, with rationale in .rubocop.yml: the
capitalized Some/None/Ok/Err constructors, the full combinator surface
on Option::Any and Result::Any, doctest expectation lines, and the
vendored core_ext presence patches.

The class-level doctest on result.rb's Object reopening moved to a
comment warning: YARD keeps one docstring per object across reopenings,
so examples there get silently dropped once other files document
Object. Its assertions already exist on the methods themselves.
@nz
nz force-pushed the chore/toolchain-refresh branch from 05d437d to 802b62f Compare July 23, 2026 15:55
@nz
nz merged commit af410ee into main Aug 7, 2026
1 check 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