Skip to content

Clarify the difference between sdkPath and sdkPaths #3994

Closed

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

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on May 26, 2022
  2. DanTup commented on May 26, 2022

    @DanTup
    Member

    I've updated the text that shows against these settings in VS Code to hopefully make things clearer. Please let me know if you think anything more could be added. Thanks!

    Screenshot 2022-05-26 at 16 49 59

  3. added this to the v3.42.0 milestone on May 26, 2022
  4. added
    in docs / websiteRelates to documentation, including the Dart Code website
    on May 26, 2022
  5. added a commit that references this issue on Sep 2, 2025
    845c5d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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