Repository navigation
Prepare 0.4.3: fix embed lifecycle and support JSON loader overrides - #11
Merged
Merged
Conversation
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.
Prepare strukt_fork 0.4.3. Newly created nested Strukt records now retain their generated timestamps, required embed lists reject missing or empty values, and trusted ordinary child structs keep their fields while respecting replacement policies.
Changes
:validate, support single-polymorphic:ignore, and reject:nilifyon polymorphic lists at schema compilation.on_replacewhen identities differ. Index list entries by identity and position to avoid repeated full-list scans.@deriveapplication, bare/option-bearing@derives Jason.Encoder, and generated changeset clauses colliding with user definitions.from_json/1overridable withsuper/1, including definitions inside schema blocks. Return an error for non-object JSON while retaining default loading and error semantics.Required lists and replacement policies now reject inputs previously accepted by the faulty behavior. For polymorphic lists configured with
on_type_not_found: :nilify, use:ignore,:changeset_error, or:raise.Validation
mix test --warnings-as-errors: 239 tests passed on Elixir 1.20.5 / OTP 29.MIX_ENV=test mix compile --force --warnings-as-errors,mix format --check-formatted, andgit diff --check: passed.mix docs --warnings-as-errors: passed.mix hex.build: passed; package metadata and contents verified asstrukt_fork 0.4.3.Additional regression review caught and fixed metadata cleanup crashing on improper lists inside opaque map values accepted by Ecto.
Local median benchmark for 2,000 ordinary embed updates improved from about 118ms to 7.3ms; updates to a pending changeset improved from about 193ms to 8.6ms.
GitHub Actions: all four configurations passed for
4c886eb(Elixir 1.17.3/OTP 27, 1.18.4/27, 1.19.5/28, and 1.20.0/28).This PR prepares the release. Tagging and Hex publication follow after merge.