Skip to content

fix(typescript): force update target file version on association dirty #267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Mar 6, 2025

In Glint, when the association script (.hbs) is updated and the target script (.ts) is not, the association script's diagnostics don't refresh correctly because the target script's getScriptVersion value hasn't changed.

We can't proxy getScriptVersion to deal with this, that would cause serious performance issues with the tsserver some how, so we send a change event to the tsserver session to force the target script to be considered new.

/cc @piotrtomiak, @machty

@johnsoncodehk johnsoncodehk merged commit efc7e88 into master Mar 6, 2025
6 of 8 checks passed
@johnsoncodehk johnsoncodehk deleted the focue-update-target branch March 6, 2025 18:55
@piotrtomiak
Copy link
Contributor

Thanks for heads up! I should be able to remove my workaround now, right?

@johnsoncodehk johnsoncodehk changed the title fix(typescript): focus update target file version on association dirty fix(typescript): force update target file version on association dirty Mar 8, 2025
@johnsoncodehk
Copy link
Member Author

@piotrtomiak I think yes! But of course we need to test it in WebStorm. (It has been tested in Glint)

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.

2 participants