Skip to content

Clarify the difference between sdkPath and sdkPaths #3994

@mdebbar

Description

@mdebbar

Is your feature request related to a problem? Please describe.

There are two ways to configure the Dart path in VS Code (and similarly for the Flutter path). The first way is dart.sdkPath which is a single path to the binary or to the folder containing the binary. The other way is the plural dart.sdkPaths which is a list of paths that can be used for switching.

The problem is (at least for me), I thought these two ways were identical. I could either provide one location or a list of locations. So I removed the singular one and used the plural one exclusively. That's when things started to break and I didn't understand why.

It turned out I was wrong. The singular setting was the only one used for locating the sdk, while the plural one was used for switching. So the plural isn't meant to replace the singular one.

Describe the solution you'd like
This distinction can be made clearer in the explanation/docs of each setting.

Describe alternatives you've considered
I looked at https://dartcode.org/docs/quickly-switching-between-sdk-versions/ but it still wasn't clear that sdkPaths wasn't used for locating/searching.

Additional context
Discussion in Discord started here: https://discord.com/channels/608014603317936148/958861835971461120/979391354733998090

Metadata

Metadata

Assignees

No one assigned

    Labels

    in docs / websiteRelates to documentation, including the Dart Code websiteis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions