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

Remove non-null assertions in searchWidget [debt] #178256

Merged
merged 1 commit into from Mar 24, 2023
Merged

Conversation

andreamah
Copy link
Contributor

@andreamah andreamah commented Mar 24, 2023

Fixes #171527
Fixes #170907

Non-null assertions have been causing telemetry errors.

In this implementation, I put warn messages when we skip registering listeners, since that might have a lasting effect on how the search viewlet is initialized. However, in most of these cases, the field should have already implemented (via a function directly or indirectly called by the constructor) except for some cases (ie: when the state is saved too early like in the first issue)

As mentioned in #170875 (comment), all non-null assertions can be tech debt, so I'm removing them all from the Search Widget.

@andreamah andreamah self-assigned this Mar 24, 2023
@andreamah andreamah marked this pull request as ready for review March 24, 2023 19:59
@VSCodeTriageBot VSCodeTriageBot added this to the March 2023 milestone Mar 24, 2023
@andreamah andreamah merged commit b934777 into main Mar 24, 2023
8 checks passed
@andreamah andreamah deleted the andreamah/issue171527 branch March 24, 2023 21:00
qwq0 pushed a commit to qwq0/vscode that referenced this pull request Mar 25, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read properties of undefined (reading 'searchInput') Remove ! from properties in search
3 participants