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

fix: Avoid crash in telemetry on module removal #707

Merged
merged 3 commits into from
Nov 10, 2021

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Nov 9, 2021

I was able to reproduce this by removing a folder from a workspace, but I also noticed that the VS Code client in particular sends shutdown to the server instead of didChangeWorkspaceFolder with the removed folder, so we can't really track module removals yet until that client-side bug is addressed.

txn.Defer(func() {
oldMod := oldObj.(*Module)
go s.ChangeHooks.notifyModuleChange(oldMod, nil)
})

I also noticed that the notifications for folder change would never work because we weren't passing the module manager down to the handler, so it would always error out 🙈 This was there since the beginning #502

@radeksimko radeksimko added the bug Something isn't working label Nov 9, 2021
@radeksimko radeksimko requested a review from a team November 9, 2021 17:56
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

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

LGTM

@radeksimko radeksimko merged commit 73d8887 into main Nov 10, 2021
@radeksimko radeksimko deleted the b-telemetry-mod-removal branch November 10, 2021 10:36
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants