Skip to content

Restore previous approach to glint-* directives atop new TS Plugin architecture#888

Merged
machty merged 4 commits intomainfrom
simplify-directives
Apr 11, 2025
Merged

Restore previous approach to glint-* directives atop new TS Plugin architecture#888
machty merged 4 commits intomainfrom
simplify-directives

Conversation

@machty
Copy link
Copy Markdown
Contributor

@machty machty commented Apr 11, 2025

The TS Plugin-friendly approach to (re-)implementing directives (e.g. {{@glint-expect-error ...}}) that I borrowed from Vue has a number of issues, in particular sometimes it breaks the syntax of the transformed TS because it outputs top-level statements in the middle of where an expression is expected in certain cases.

Fortunately in the meantime I was able to get some feedback from the Volar/Vue team as to how to reinstate essentially the previous Glint 1 algorithm/behavior for directives but have it work atop TS Plugin. This PR implements this "hybrid" approach and should faithfully reinstate Glint V1's algorithm, which seemed to work well enough for everyone.

@machty machty merged commit 1ed1e8f into main Apr 11, 2025
2 checks passed
@machty machty deleted the simplify-directives branch April 11, 2025 20:30
@github-actions github-actions Bot mentioned this pull request Apr 11, 2025
@NullVoxPopuli NullVoxPopuli added the enhancement New feature or request label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants