Skip to content

Conversation

@plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Dec 18, 2025

Because settings can be arbitrary JSON we should validate their type when reading them in. TypeScript provides a bit of a false sense of security here since at runtime they can be whatever the user wants, and then the extension falls over in wierd and wonderful ways.

Add some basic type checking methods to make sure we're working with booleans, constrained strings/strings, or arrays of strings.

Issue: #2007

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

Because settings can be arbitrary JSON we should validate their type
when reading them in. TypeScript provides a bit of a false sense of
security here since at runtime they can be whatever the user wants, and
then the extension falls over in wierd and wonderful ways.

Add some basic type checking methods to make sure we're working with
booleans, constrained strings/strings, or arrays of strings.

Issue: swiftlang#2007
@plemarquand plemarquand force-pushed the better-bad-settings-error-message branch from d5ad5e1 to 94ce638 Compare December 19, 2025 16:41
@plemarquand plemarquand force-pushed the better-bad-settings-error-message branch 2 times, most recently from 49017c0 to e923df5 Compare December 19, 2025 19:25
@plemarquand plemarquand force-pushed the better-bad-settings-error-message branch from e923df5 to d1d5a47 Compare December 19, 2025 19:26
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.

2 participants