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

bugfix: add user config promise #5751

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

kasiaMarek
Copy link
Contributor

resolves: #5750

The config carried by didChangeConfiguration is no longer used by metals (only as fallback), the notification is only used as information for metals to update the config, which is done using the workspace/configuration request (more). In #5750 the response to workspace/configuration comes after the request for semantic tokens, so the default config instead of a user specified one is used.

I just wonder if this can happen for other things aside for semantic tokens too (initialized waits for config sync to succeed). I considered lifting userConfig to Future in all places but that seems lika a bit of a problematic refactor. Thoughts?

@kasiaMarek kasiaMarek requested a review from tgodzik October 16, 2023 10:24
else semanticTokens
}
for {
_ <- userConfigPromise.future
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially, we could have a similar issue with parent code lenses superMethodLensesEnabled, no? Though I think we might send refresh in that case 🤔 We might also send refresh for semantic tokens when they change.

Maybe we should wait for the build server promise, which should most likely be after requesting semantic tokens?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code lenses already wait for the buildServerPromise so that's fine.

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge this and see if there is a need to fix something further later on.

@kasiaMarek kasiaMarek merged commit a2d4ebc into scalameta:main Oct 17, 2023
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.

didChangeConfiguration not being listened to
2 participants