Update TracingResolver to accept Context parameter - #12
Merged
Merged
Conversation
v0.4.0 changed the Resolver interface to thread a Context through each call and removed SymbolRegistry in favour of Context-carried Definitions and Bindings. The tracing inspector also moved from container injection onto the Context. - Require gosuperscript/axiom ^0.4.0 - TracingResolver::resolve(Source, Context) matches new interface; at the root call we swap the Context's inspector for our tree-aware TracingResolutionInspector, then propagate that Context through recursive resolution - Drop the ResolutionInspector container binding (no longer injected; resolvers read the inspector from the Context) - TracingResolver::traced() now accepts an optional Context - Update tests to use Context/Definitions instead of SymbolRegistry - Update README to document the new Context-based API
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.
Summary
Updates the
TracingResolverto accept aContextparameter in itsresolve()andtraced()methods, aligning with changes in the axiom library (v0.4.0). The resolver now manages inspector injection at the root level rather than during construction.Key Changes
resolve(Source $source)toresolve(Source $source, Context $context)andtraced(Source $source)totraced(Source $source, ?Context $context = null)createResolver()to remove symbol parameter and added newcontext()helper for creating contexts with definitionsImplementation Details
TracingResolverno longer registers itself as aResolutionInspectorin the container during constructionContextwith its tree-aware inspector if the provided context doesn't already have oneContextinstances (with or without definitions) to resolve/traced callshttps://claude.ai/code/session_01YRTrWLWi2ethcHrQ4SraWZ