Reduce console error/warning noise #9270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change removes a good chunk (but not all) of the noisy errors and warnings in the console output that happen even in a perfectly normal Positron startup.
Addresses #9182.
API Proposals
The biggest offender; VS Code has strict handling for API proposals and ensures that an extension explicitly declare exactly which proposals it wants; this must match the set of proposals enabled for the extension on the VS Code side. Because Positron doesn't enforce API proposals, we have allowed the API proposal sets to get very stale, resulting in many errors like these:
The fix is to turn off more parts of the API proposal validation system, since we don't use it in Positron.
Can't read properties of
experiment
This was introduced with the upstream 103 merge. On every boot, this shows up in the console:
It appears that this is caused by experimental setting schema missing. There's a recent 103 change to tolerate this, but it doesn't handle the case where the schema is missing entirely.
Can't parse Positron version
This has been in builds for some time:
The problem is just that this code is sometimes called when we don't have a version at all (that is, version is just an empty string), which is really fine when we're doing e.g. an update check and there is no previous version.
The fix is to allow the codepaths that parse the version to return
undefined
(i.e. "no version") when given an empty string, and to handle that value safely elsewhere.