Skip to content

Show the matching trait in the struct type macro docstrings - #108

Merged
quinnj merged 1 commit into
mainfrom
claude/macro-docstrings
Oct 15, 2026
Merged

quinnj merged 1 commit into
mainfrom
claude/macro-docstrings

Conversation

@quinnj

@quinnj quinnj commented Oct 15, 2026

Copy link
Copy Markdown
Member

The docstrings generated for @Struct, @Mutable, @DictType, and the other struct type macros all said the macro is equivalent to StructTypes.StructType(::Type{MyStruct}) = StructType.Struct(). That example names a nonexistent StructType module and shows the wrong trait for every macro except @Struct.

The example now interpolates the macro's own trait, so @doc StructTypes.@Mutable shows StructTypes.StructType(::Type{MyStruct}) = StructTypes.Mutable().

Verification: rendered @doc for @Mutable, @Struct, and @DictType on Julia 1.12.6 and checked both examples in each show the matching StructTypes.<Trait>(). Docstring-only change.

🤖 Generated with Claude Code

Each generated macro docstring said the macro was equivalent to
`StructType.Struct()`, which names a nonexistent module and the wrong
trait for every macro except @struct. Interpolate the macro's own trait.

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

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.38%. Comparing base (90f9ecf) to head (bc303f8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #108   +/-   ##
=======================================
  Coverage   78.38%   78.38%           
=======================================
  Files           2        2           
  Lines         421      421           
=======================================
  Hits          330      330           
  Misses         91       91           

☔ 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 merged commit cb0556b into main Oct 15, 2026
7 checks passed
@quinnj
quinnj deleted the claude/macro-docstrings branch October 15, 2026 18:08
@quinnj quinnj mentioned this pull request Oct 15, 2026
quinnj referenced this pull request Oct 15, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant