Skip to content

Conversation

@DanTup
Copy link
Member

@DanTup DanTup commented Mar 26, 2025

These are sent once the server has started, and also if any config change affects any of the interesting sections (which are currently "dart" and "editor"). The reported config is scoped to Dart config (falling back to defaults if no Dart-specific config is set), which means we can't tell if someone has formatOnSave set to something different for YAML files (for example), but if becomes useful, we could split this out to record multiple languages values.

This info is visible in the analyzer diagnostics pages as well as the exported report. For a sample workspace it looks like this:

image

For a single-root workspace, only the global section would be present. For a multi-root workspace, we'll add folder_x sections for any workspace folder that has settings that differ from the global one.

@bwilkerson @pq the settings included for now are below - let me know if you think there's anything else we should include (we can ofc update this over time). Additionally, I've included the "hostKind", which is a string that helps identify the environment being run in (for example Docker, WSL, Codespaces, or just native VS Code desktop).

const interestingSettings: { [key: string]: string[] } = {
	dart: [
		"onlyAnalyzeProjectsWithOpenFiles", // This affects the analysis roots and whether we change them as files open/close which can affect perf
	],
	editor: [
		"formatOnSave",
		"formatOnPaste",
		"formatOnType",
		"codeActionsOnSave",
	],
};

… reports

Sent once the server has started, and also if any config change affects any of the interesting sections (currently "dart" and "editor").

Config is scoped to Dart-specific config (falling back to defaults if no Dart-specific config is set).
@DanTup DanTup added this to the v3.108.0 milestone Mar 26, 2025
@pq
Copy link

pq commented Mar 26, 2025

Looks like a great start. Thank you!

Copy link

@bwilkerson bwilkerson left a comment

Choose a reason for hiding this comment

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

That output looks good to me too.

@DanTup DanTup merged commit bae1440 into master Mar 27, 2025
25 of 26 checks passed
@DanTup DanTup deleted the include-client-diagnostics branch March 27, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants