Skip to content

Make AttributeBodyVisitor visit mutating#226

Merged
Kyle-Ye merged 1 commit intomainfrom
codex/mutating-attribute-body-visitor
Apr 28, 2026
Merged

Make AttributeBodyVisitor visit mutating#226
Kyle-Ye merged 1 commit intomainfrom
codex/mutating-attribute-body-visitor

Conversation

@Kyle-Ye
Copy link
Copy Markdown
Contributor

@Kyle-Ye Kyle-Ye commented Apr 28, 2026

Summary

  • Mark AttributeBodyVisitor.visit as mutating so visitor implementations can keep state while traversing attribute bodies.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.10%. Comparing base (c05ccf5) to head (bd7d729).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
+ Coverage   31.08%   32.10%   +1.02%     
==========================================
  Files          71       71              
  Lines        2635     2601      -34     
==========================================
+ Hits          819      835      +16     
+ Misses       1816     1766      -50     
Flag Coverage Δ
ios 32.11% <ø> (+0.95%) ⬆️
macos 10.15% <ø> (+6.92%) ⬆️
ubuntu 12.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 11 files with indirect coverage changes

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

@Kyle-Ye Kyle-Ye changed the title [codex] Make AttributeBodyVisitor visit mutating Make AttributeBodyVisitor visit mutating Apr 28, 2026
@Kyle-Ye Kyle-Ye marked this pull request as ready for review April 28, 2026 16:53
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 28, 2026

🤖 Augment PR Summary

Summary: Makes AttributeBodyVisitor.visit(body:) a mutating requirement.
Why: Enables visitor implementations to keep internal state while traversing attribute bodies via visitBody(_:).

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.


public protocol AttributeBodyVisitor {
func visit<Body: _AttributeBody>(body: UnsafePointer<Body>)
mutating func visit<Body: _AttributeBody>(body: UnsafePointer<Body>)
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sources/OpenAttributeGraph/Attribute/Body/AttributeBodyVisitor.swift:8 — With visit now mutating, any struct/enum conformers must also mark their implementation as mutating or they will no longer satisfy AttributeBodyVisitor (e.g., the Visitor in Tests/OpenAttributeGraphCompatibilityTests/Attribute/Attribute/AnyAttributeCompatibilityTests.swift). Consider ensuring internal/downstream conformers are updated accordingly.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@Kyle-Ye Kyle-Ye force-pushed the codex/mutating-attribute-body-visitor branch from 0a15268 to bd7d729 Compare April 28, 2026 17:26
@Kyle-Ye Kyle-Ye merged commit f9b6763 into main Apr 28, 2026
8 checks passed
@Kyle-Ye Kyle-Ye deleted the codex/mutating-attribute-body-visitor branch April 28, 2026 17:26
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