Skip to content

Avoid JSONReadStyle trait ambiguity#465

Draft
quinnj wants to merge 1 commit into
masterfrom
codex/fix-issue-464-style-ambiguity
Draft

Avoid JSONReadStyle trait ambiguity#465
quinnj wants to merge 1 commit into
masterfrom
codex/fix-issue-464-style-ambiguity

Conversation

@quinnj
Copy link
Copy Markdown
Member

@quinnj quinnj commented Jun 4, 2026

Summary

Root Cause

JSONReadStyle forwarding introduced a dispatch crossing between JSON wrapper-style methods and user methods that are broad on the style axis but specific on the target type, such as dictlike(::StructStyle, ::Type{A}).

Testing

  • git diff --check
  • julia --project=/tmp/jsonjl-464-slim --startup-file=no -e 'using Pkg; Pkg.instantiate(); Pkg.test(; coverage=false)'

Fixes #464

Co-authored by Codex

@quinnj quinnj force-pushed the codex/fix-issue-464-style-ambiguity branch from cc0619d to 801acf2 Compare June 4, 2026 21:22
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

❌ Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.39%. Comparing base (6e487a9) to head (3a8782a).

Files with missing lines Patch % Lines
src/parse.jl 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #465      +/-   ##
==========================================
+ Coverage   90.32%   90.39%   +0.07%     
==========================================
  Files           7        7              
  Lines        1416     1427      +11     
==========================================
+ Hits         1279     1290      +11     
  Misses        137      137              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@quinnj quinnj force-pushed the codex/fix-issue-464-style-ambiguity branch 2 times, most recently from 064045e to bffcf6c Compare June 4, 2026 21:41
Avoid wrapping custom JSONStyle values on the default parse path, while keeping JSON lazy-value lifting available on JSONStyle itself. This lets broad style-level StructUtils methods dispatch without conflicting with JSONReadStyle forwarding.

Fixes #464
@quinnj quinnj force-pushed the codex/fix-issue-464-style-ambiguity branch from bffcf6c to 3a8782a Compare June 4, 2026 21:51
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.

Method ambiguity for custom types with generically defined StructUtils.StructStyle methods

1 participant