From 8b00d58be27c13b893c8e97796622ccca24fe67d Mon Sep 17 00:00:00 2001 From: Kyle Thompson Date: Fri, 21 Aug 2026 02:42:57 +0000 Subject: [PATCH 1/2] Prepare Strict 2.0.0 for release Amp-Thread-ID: https://ampcode.com/threads/T-01a0222f-0770-70bc-ab85-85bea92893dd --- API.md | 2 +- CHANGELOG.md | 9 ++++++--- Gemfile.lock | 2 +- README.md | 2 +- lib/strict/version.rb | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/API.md b/API.md index 4f7e9b5..bc4a0a4 100644 --- a/API.md +++ b/API.md @@ -1,6 +1,6 @@ # Supported API -This document defines the compatibility boundary for Strict's next major release. Code inside this boundary is public API. Other reachable Ruby constants, methods, generated modules, and reflection details are implementation details unless this document identifies them as public. +This document defines the compatibility boundary for Strict 2.0. Code inside this boundary is public API. Other reachable Ruby constants, methods, generated modules, and reflection details are implementation details unless this document identifies them as public. ## Capabilities diff --git a/CHANGELOG.md b/CHANGELOG.md index de5aa07..59f2e96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ ## [Unreleased] +## [2.0.0] - 2026-08-21 + ### Added -- Define and characterize the supported next-major API in `API.md`, provide RBS signatures for that boundary, validate them in the default checks, and add repeatable timing and allocation benchmark tooling. +- Define and characterize the supported 2.0 API in `API.md`, provide RBS signatures for that boundary, validate them in the default checks, and add repeatable timing and allocation benchmark tooling. - Add closed discriminated unions whose generated variants use `Strict::Value` for attributes and value behavior. - Add inherited value and object attribute declarations and shared union attributes. - Add structured validation violations with paths, codes, rejected values, and validators for assignment, initialization, signed method calls, and returns, plus an optional detailed-validator protocol for custom nested failures. @@ -11,7 +13,7 @@ ### Breaking changes -- Standardize all four capabilities on `include`: `Strict::Value`, `Strict::Object`, `Strict::Method`, and `Strict::Interface`. The legacy `extend Strict::Method` and `extend Strict::Interface` forms are outside the supported next-major API. +- Standardize all four capabilities on `include`: `Strict::Value`, `Strict::Object`, `Strict::Method`, and `Strict::Interface`. The legacy `extend Strict::Method` and `extend Strict::Interface` forms are outside the supported 2.0 API. - Make signed method returns validate-only. `returns` rejects coercion options, validates the original result, and preserves its identity for the caller. - Reject malformed or same-block duplicate attribute declarations, repeated attribute blocks, duplicate or repeated signatures, and same-class or Strict/core-reserved generated attribute method collisions with `ArgumentError` instead of silently replacing declarations or installing pathological methods. @@ -100,7 +102,8 @@ The equal-weight geometric mean of the eight after/before timing ratios is 0.57, - Start initial development. -[Unreleased]: https://github.com/kylekthompson/strict/compare/v1.5.0...HEAD +[Unreleased]: https://github.com/kylekthompson/strict/compare/v2.0.0...HEAD +[2.0.0]: https://github.com/kylekthompson/strict/compare/v1.5.0...v2.0.0 [1.5.0]: https://github.com/kylekthompson/strict/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/kylekthompson/strict/compare/v1.3.1...v1.4.0 [1.3.1]: https://github.com/kylekthompson/strict/compare/v1.3.0...v1.3.1 diff --git a/Gemfile.lock b/Gemfile.lock index 8955ba8..a163915 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - strict (1.5.0) + strict (2.0.0) zeitwerk (~> 2.8) GEM diff --git a/README.md b/README.md index a1bcbab..8b30d66 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ $ gem install strict ## Usage -See [Supported API](API.md) for the next major release's compatibility boundary. +See [Supported API](API.md) for the 2.0 compatibility boundary. ### `Strict::Value` diff --git a/lib/strict/version.rb b/lib/strict/version.rb index 26838ed..98f541d 100644 --- a/lib/strict/version.rb +++ b/lib/strict/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Strict - VERSION = "1.5.0" + VERSION = "2.0.0" end From f69336137e62283353b1b0af954ec6f0d73e7a89 Mon Sep 17 00:00:00 2001 From: Kyle Thompson Date: Fri, 21 Aug 2026 02:45:52 +0000 Subject: [PATCH 2/2] Retain compatibility with Zeitwerk 2.6 Amp-Thread-ID: https://ampcode.com/threads/T-01a0222f-0770-70bc-ab85-85bea92893dd --- CHANGELOG.md | 2 +- Gemfile.lock | 2 +- strict.gemspec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f2e96..942dfd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ ### Changed - Require Ruby 3.3 or newer and test against all maintained Ruby releases. -- Update runtime and development dependencies to their latest release lines. +- Update development dependencies to their latest release lines while retaining Zeitwerk 2.x compatibility from 2.6 onward. - Compile signed-method invocation metadata once, reuse unchanged call arguments, and consolidate generated wrappers by owner. - Preserve validated explicit keywords when keyrest processing changes a signed call. - Forward validated interface calls directly to implementations and compile interface-conformance expectations once per interface definition. diff --git a/Gemfile.lock b/Gemfile.lock index a163915..8b95819 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: strict (2.0.0) - zeitwerk (~> 2.8) + zeitwerk (~> 2.6) GEM remote: https://rubygems.org/ diff --git a/strict.gemspec b/strict.gemspec index 8fbce24..7bde7cb 100644 --- a/strict.gemspec +++ b/strict.gemspec @@ -29,5 +29,5 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "zeitwerk", "~> 2.8" + spec.add_dependency "zeitwerk", "~> 2.6" end