Skip to content

SDK path detection on Linux / Mac is not reliable #17

Closed

Description

@hentoesch

package installs successfully, after restart i get error message that sdk is not on path and must be configured in settings.
i have dart sdk in PATH and configuration of sdk in settings is not possible.

Activity

  1. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    i have dart sdk in PATH

    My guess is that this is the same issue I had when testing; you have something like /usr/bin in PATH which has a dart symlink. This means the actual Dart SDK location (/usr/lib/dart?) is not in PATH. I'll try and put a fix in for this today (by either searching the default install location when using Google's apt package, or detecting a dart executable and if it's a symlink, resolving it).

    configuration of sdk in settings is not possible

    If you do File -> User Preferences (or whatever the equiv is) you should get a split pain of JSON (left is defaults, right is your overrides). If you start typing dart as a new value on the right, you don't get auto-complete for dart.sdkPath? If you do, add "dart.sdkPath": "/usr/lib/dart" (or whatever the real path is - it needs to be such that the folder contains bin/snapshots/analysis_server.dart.snapshot exists inside the configured sdkPath).

  2. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Aug 5, 2016
  3. hentoesch commented on Aug 5, 2016

    @hentoesch
    Author

    i did have /usr/bin AND /usr/lib/dart/bin in my PATH (but in that respective order).
    after changing the order in .bashrc, so that /usr/lib/dart/bin was first, the error message did not go away.

    i think the problem is that my PATH config is /usr/lib/dart/bin and you are awaiting /usr/lib/dart (without the bin).

    editing the User Preferences and specifying /usr/lib/dart as sdkpath did make the error message disappear.

  4. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    In PATH I assume it's to the bin folder (else dart wouldn't work) but assume the sdkPath is root, but maybe something isn't working quite as expected. Glad you got it working be setting sdkPath, but I will definitely make some improvements in this area. If Dart is on your path in any form I should be able to use it and not force you to have to enter it (though for now, specifying it will improve startup performance until I do #8).

    Thanks for the feedback and responses; really appreciate it!

  5. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    Just occurred to me, the reason it failed to search path was nothing to do with symlinks, it's because the path delimiter on Linux is different! This will all be fixed before next release.

  6. added
    good first issue :octocat:A relatively straight forward issue that could be done by a new contributor
    on Aug 5, 2016
  7. added this to the milestone on Aug 5, 2016
  8. self-assigned this
    on Aug 5, 2016
  9. changed the title [-]ubuntu 16.04, cannot find sdk path[/-] [+]SDK path detection on Linux / Mac is not reliable[/+] on Aug 5, 2016
  10. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    Thanks for the report; the next preview release (which I hope to put in the store this weekend) now correctly handles Linux/Max paths and will resolve symlinks. I've just tested this on a clean Ubuntu install without the sdkPath set and it worked fine with the apt-get version from Google.

  11. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    If you remove the old version you can install a new preview from the VS Code marketplace which resolves the SDK issues (you can remove the sdkPath and it should still work):

    https://marketplace.visualstudio.com/items?itemName=DanTup.dart-code

  12. removed
    good first issue :octocat:A relatively straight forward issue that could be done by a new contributor
    on May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

is bugis 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