Skip to content

fix: directive compiler resolves namespace imports for hostDirectives references#79

Merged
Brooooooklyn merged 1 commit intomainfrom
fix/directive-host-directives-namespace-resolution
Mar 5, 2026
Merged

fix: directive compiler resolves namespace imports for hostDirectives references#79
Brooooooklyn merged 1 commit intomainfrom
fix/directive-host-directives-namespace-resolution

Conversation

@Brooooooklyn
Copy link
Member

@Brooooooklyn Brooooooklyn commented Mar 5, 2026

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 hostDirectives references; risk is limited to potential incorrect namespace assignment affecting generated output for directives using host directives.

Overview
Fixes directive compilation when hostDirectives reference imported directives by rewriting host directive identifiers to namespace-qualified expressions (e.g., BrnTooltipTriggeri1.BrnTooltipTrigger) based on the file’s import map, ensuring runtime correctness after import elision.

Adds resolve_host_directive_namespaces() and invokes it during @Directive processing, plus a regression test asserting the generated namespace import and that no bare host directive references remain in the emitted features output.

Written by Cursor Bugbot for commit cb874e1. This will update automatically on new commits. Configure here.

… 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>
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Brooooooklyn Brooooooklyn merged commit 029fcde into main Mar 5, 2026
4 checks passed
@Brooooooklyn Brooooooklyn deleted the fix/directive-host-directives-namespace-resolution branch March 5, 2026 06:32
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.

Directive compiler missing namespace resolution for hostDirectives references

1 participant