Skip to content

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Aug 16, 2025

Summary

The fact that these return owned Arcs has already caused a number of borrow-checker issues that have been annoying to workaround. And I just ran into this yet again while working on another change.

Everything seems to compile if we return &Arc from these methods rather than Arc, and (since the implicit lifetime of the borrow is 'db) this solves a lot of borrow-checker issues!

Test Plan

Existing tests

@AlexWaygood AlexWaygood added ty Multi-file analysis & type inference internal An internal refactor or improvement labels Aug 16, 2025
Copy link
Contributor

github-actions bot commented Aug 16, 2025

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

Copy link
Contributor

github-actions bot commented Aug 16, 2025

mypy_primer results

No ecosystem changes detected ✅
No memory usage changes detected ✅

@AlexWaygood AlexWaygood marked this pull request as ready for review August 16, 2025 21:09
@AlexWaygood AlexWaygood force-pushed the alex/refactor-use-def branch from 7234453 to 2b24d92 Compare August 16, 2025 21:50
@AlexWaygood AlexWaygood changed the base branch from main to alex/namedtuple-multiple-inheritance August 16, 2025 21:50
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

thank you

@AlexWaygood AlexWaygood force-pushed the alex/refactor-use-def branch from 2b24d92 to adaabb7 Compare August 18, 2025 10:25
@AlexWaygood AlexWaygood changed the base branch from alex/namedtuple-multiple-inheritance to main August 18, 2025 10:25
@AlexWaygood AlexWaygood merged commit 4ac2b2c into main Aug 18, 2025
55 of 56 checks passed
@AlexWaygood AlexWaygood deleted the alex/refactor-use-def branch August 18, 2025 10:30
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants