Repository navigation
Preserve field dispatch for ignored defaults - #105
Merged
Merged
Conversation
Remove the invalid fallback that references x in the type-only dispatcher. Unknown or excluded names return false without running the callback; defaults continue to be applied by construction. Add regression tests for these cases. Restore validation on current Julia: account for UUID becoming public in Base, replace retired CI actions, authenticate coverage with GitHub OIDC, and repair strict documentation builds. The corrected NamedTuple defaults example was proposed by hellemo in #101. Full suites pass on Julia 1.6.7, 1.12.6, and 1.13.1; the new 20-check regression set and JSON3 1.14.3 reproduction pass. Documenter 1.19 builds with strict checks. AI disclosure: This work was prepared with assistance from OpenAI Codex.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #105 +/- ##
==========================================
+ Coverage 75.31% 76.57% +1.25%
==========================================
Files 2 2
Lines 401 414 +13
==========================================
+ Hits 302 317 +15
+ Misses 99 97 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Oct 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
quinnj
referenced
this pull request
Oct 15, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 15, 2026
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.
Reading JSON into a struct can throw
UndefVarError: xwhen a default is defined for an unknown or excluded field name. The type-only field dispatcher tries to mutate an object that does not exist. Remove that fallback so ignored names return false without calling the callback; construction continues to apply defaults. Add 20 checks for unknown/excluded names, renamed exclusions, callback execution, mutable values, and construction defaults. Fixes #92.The existing validation needed repairs: UUID is now public in Base (#102), cache/uploader actions were retired, and the documentation had an unsupported option, a broken reference, and 16 unlisted docstrings. Restore the test and strict documentation checks, and authenticate repository coverage uploads with GitHub OIDC. The NamedTuple defaults example incorporates hellemo's correction from #101.
Validation: the new checks reproduce three undefined-variable errors before the fix and all pass afterward. Full source suites pass on Julia 1.6.7, 1.12.6, and 1.13.1 with four threads and bounds checks. A JSON3 1.14.3 reproducer fails on two unknown-key reads before the fix and passes all six checks afterward. Documenter 1.19 builds with strict checks; rendered API anchors and GitHub source links are verified. All seven GitHub checks pass at d42b5a9. The stable-job log confirms an accepted OIDC coverage upload to JuliaData/StructTypes.jl at that revision; both coverage checks pass.
Co-authored by Codex
AI disclosure: This work was prepared with assistance from OpenAI Codex.