feat: add LinkResolver.isTypeKnown so implementers stop naming an internal class - #142
Open
ehennestad wants to merge 1 commit into
Open
feat: add LinkResolver.isTypeKnown so implementers stop naming an internal class#142ehennestad wants to merge 1 commit into
ehennestad wants to merge 1 commit into
Conversation
ehennestad
force-pushed
the
add-linkresolver-istypeknown
branch
from
September 4, 2026 20:12
6be947a to
91deb95
Compare
ehennestad
force-pushed
the
add-linkresolver-istypeknown
branch
from
September 4, 2026 21:01
91deb95 to
c706366
Compare
Contributor
Test Results (R2022a)803 tests 802 ✅ 3m 13s ⏱️ Results for commit 4d19d5b. ♻️ This comment has been updated with latest results. |
Contributor
Test Results (R2026a)803 tests 802 ✅ 3m 5s ⏱️ Results for commit 4d19d5b. ♻️ This comment has been updated with latest results. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## document-inherited-contracts #142 +/- ##
===============================================================
Coverage ? 81.09%
===============================================================
Files ? 422
Lines ? 4205
Branches ? 0
===============================================================
Hits ? 3410
Misses ? 795
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ehennestad
force-pushed
the
add-linkresolver-istypeknown
branch
from
September 4, 2026 21:10
c706366 to
e613c5b
Compare
…ernal class The LinkResolver interface documents a fork every implementer has to take. A reference whose type is known can be populated in place; one whose type is not known until it is probed has to be replaced, since an instance cannot change its class. The interface then gave no way to tell which case you were in, so kg-sync tests isa against openminds.internal.MixedTypeReference. An interface that describes a fork and hides the switch is incomplete. Add the switch as a static method on the interface rather than promoting the class. An implementer is already reading LinkResolver to find out what to write, so that is where they will look for it, and it adds no new top-level name while MixedTypeReference stays internal. Also stop the interface's own help pointing at internal classes. It named ResolvingVisitor twice, once in a See also, which told a reader to go look at something they are not meant to use. Both now describe the behaviour as the toolbox's rather than naming the class that implements it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ehennestad
force-pushed
the
add-linkresolver-istypeknown
branch
from
September 5, 2026 05:00
e613c5b to
4d19d5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
LinkResolverinterface documents a fork every implementer has to take. A reference whose type is known can be populated in place; one whose type is not known until it is probed has to be replaced, since an instance cannot change its class. The interface then gave no way to tell which case you were in, so kg-sync testsisaagainstopenminds.internal.MixedTypeReference.An interface that describes a fork and hides the switch is incomplete.
What
Adds the switch as a static method on the interface rather than promoting the class. An implementer is already reading
LinkResolverto find out what to write, so that is where they will look for it, and it adds no new top-level name whileMixedTypeReferencestays internal.Also stops the interface's own help pointing at internal classes. It named
ResolvingVisitortwice, once in aSee also, telling a reader to go look at something they are not meant to use.🤖 Generated with Claude Code