You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SDK path detection on Linux / Mac is not reliable #17
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.
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).
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.
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!
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.
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.
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):
Activity
DanTup commentedon Aug 5, 2016
My guess is that this is the same issue I had when testing; you have something like
/usr/bininPATHwhich has adartsymlink. This means the actual Dart SDK location (/usr/lib/dart?) is not inPATH. 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 adartexecutable and if it's a symlink, resolving it).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 typingdartas a new value on the right, you don't get auto-complete fordart.sdkPath? If you do, add"dart.sdkPath": "/usr/lib/dart"(or whatever the real path is - it needs to be such that the folder containsbin/snapshots/analysis_server.dart.snapshotexists inside the configured sdkPath).hentoesch commentedon Aug 5, 2016
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.
DanTup commentedon Aug 5, 2016
In
PATHI assume it's to thebinfolder (elsedartwouldn't work) but assume thesdkPathis root, but maybe something isn't working quite as expected. Glad you got it working be settingsdkPath, 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!
DanTup commentedon Aug 5, 2016
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.
Use platform-specific path delimiter when parsing PATH.
[-]ubuntu 16.04, cannot find sdk path[/-][+]SDK path detection on Linux / Mac is not reliable[/+]Resolve Dart symlinks to allow path detection on Linux/Mac.
DanTup commentedon Aug 5, 2016
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
sdkPathset and it worked fine with theapt-getversion from Google.DanTup commentedon Aug 5, 2016
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
sdkPathand it should still work):https://marketplace.visualstudio.com/items?itemName=DanTup.dart-code