Skip to content
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

Emit onUpdate event on DocumentBuilder#build #1190

Merged
merged 1 commit into from
Sep 15, 2023
Merged

Conversation

msujew
Copy link
Member

@msujew msujew commented Sep 14, 2023

Related to #1188.

The global scope cache only gets cleared on DocumentBuilder#update, which works well in the language server case. However, in the CLI case, it is recommended to use build instead, which doesn't call the listeners registered via DocumentBuilder#onUpdate.

This results in incorrectly linked references, as the global scope hasn't been updated. This change also calls the update listeners on build, while also allowing the update listener to be potentially promises.

@msujew msujew added the scoping Scoping related issue label Sep 14, 2023
@spoenemann spoenemann added this to the v2.1.0 milestone Sep 15, 2023
@msujew msujew merged commit f3cf206 into main Sep 15, 2023
4 checks passed
@msujew msujew deleted the msujew/emit-on-update branch September 15, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scoping Scoping related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants