Skip to content

Update documentation of StructTypes.defaults - #101

Closed
hellemo wants to merge 1 commit into
JuliaData:mainfrom
hellemo:lh/fix_documetnation_of_defaults
Closed

hellemo wants to merge 1 commit into
JuliaData:mainfrom
hellemo:lh/fix_documetnation_of_defaults

Conversation

@hellemo

@hellemo hellemo commented Oct 20, 2023

Copy link
Copy Markdown

Make example in docstring return a NamedTuple.

I was very confused and did not get my defaults to work until I noticed that defaults(::Type{T}) where {T} returns a NamedTuple.

Give example with `NamedTuple`
quinnj added a commit that referenced this pull request Oct 14, 2026
* Preserve field dispatch for ignored defaults

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.

* Trim applyfield defaults test; don't fail CI on Codecov upload errors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@quinnj

quinnj commented Oct 15, 2026

Copy link
Copy Markdown
Member

[comment generated via AI] Thanks! This exact change landed in #105, whose commit message credits this PR. Closing as already merged.

@quinnj quinnj closed this Oct 15, 2026
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