fix: directive compiler resolves namespace imports for hostDirectives references#79
Merged
Brooooooklyn merged 1 commit intomainfrom Mar 5, 2026
Conversation
… references When a @directive uses hostDirectives referencing imported directives, the compiled output now uses namespace-prefixed references (e.g., i1.BrnTooltipTrigger) instead of bare variable references that would be undefined after import elision. - Close #68 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.

When a @directive uses hostDirectives referencing imported directives, the compiled
output now uses namespace-prefixed references (e.g., i1.BrnTooltipTrigger) instead
of bare variable references that would be undefined after import elision.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Note
Low Risk
Small, localized change to directive codegen that only rewrites
hostDirectivesreferences; risk is limited to potential incorrect namespace assignment affecting generated output for directives using host directives.Overview
Fixes directive compilation when
hostDirectivesreference imported directives by rewriting host directive identifiers to namespace-qualified expressions (e.g.,BrnTooltipTrigger→i1.BrnTooltipTrigger) based on the file’s import map, ensuring runtime correctness after import elision.Adds
resolve_host_directive_namespaces()and invokes it during@Directiveprocessing, plus a regression test asserting the generated namespace import and that no bare host directive references remain in the emittedfeaturesoutput.Written by Cursor Bugbot for commit cb874e1. This will update automatically on new commits. Configure here.