Sdk: dart executed via symlink fails on mac

Created on 3 Apr 2020  Â·  19Comments  Â·  Source: dart-lang/sdk

Dart VM version: 2.8.0-dev.20.0 – SHA 803c0cd8da8125af1fe3a73970d66af892775fb7

brew installs dart in

$BREW/Cellar/dart/2.8.0-dev.20.0/libexec/bin

symlink is added to
$BREW/bin/dart -> ../Cellar/dart/2.8.0-dev.20.0/bin/dart

$BREW/bin is on path

> dart bin/some_exe.dart
Error: Error when reading 'bin/some_exe.dart': No such file or directory
> $BREW/bin/dart bin/some_exe.dart
Error: Error when reading 'bin/some_exe.dart': No such file or directory

This works fine

> $BREW/Cellar/dart/2.8.0-dev.20.0/libexec/bin/dart bin/some_exe.dart
All good!

Something with how the dart exe determines it's working directory seems very broken – at least on mac!

P1 area-sdk area-vm type-bug vm-regression

All 19 comments

https://github.com/dart-lang/sdk/commit/99a5117411f9b9fae2866dee85573e9894db1f46 seems like it could be a culprit – CC @bkonyi

Instead of moving forward with another change I am wondering if it be more safe to do a cherry pick that reverts this change in 2.8, the change was made for dartdev which is not a feature for 2.8

Since we have a revert for this to be merged into the dev release bumping down priority from P0 to P2

Change to P1 to reflect priority for cherrypick, P2 will not meet the bar
Added merge-to-beta, merge-to-dev label for cherrypick process

Temporary workaround for homebrew until this goes out in the dev channel is to install the beta upcoming channel:

$ brew unlink dart
$ brew install dart-beta
$ dart --version
Dart VM version: 2.8.0-dev.20.7 (beta) (Tue Apr 14 08:59:52 2020 +0200) on "macos_x64"

It's a bit weird that there are fixes in beta not in dev... 🤷

@kevmoo I'm working on dev as well. We're in a bit of a weird state because of alignment with Flutter versioning.

Do we need some tweaking in the cherry pick process to ensure the merges flow first into dev and then into beta?

No, this is purely temporary and a technical rather than a process issue.

@bkonyi – this is back in the latest dev release - 2.9.0-1.0.dev

Verified fixed in 2.9.0-3.0.dev (dev) – thanks @bkonyi !

Thank you for verifying @kevmoo! May this issue remain closed for the rest of time...

I'm still see brew issues w/ the latest dev; is that expected? There's nothing left to merge?

dart analyze  
Could not find DartDev snapshot and 'analyze' is not a valid script.

dart --version
Dart VM version: 2.9.0-7.0.dev (dev) (Thu May 7 09:17:54 2020 +0200) on "macos_x64"

Hm, not sure what the issue was, but it seems to disappear when I replace the last symlink in the brew install to point towards my locally built SDK. I've been fiddling with the options parsing quite a bit over the last week, so it could be that this was just a temporary failure that's been fixed in a follow up CL that came after we created the dev build.

Let's confirm whether or not this issue is still occurring once we create the next dev release.

Confirmed that we're seeing this again.

@devoncarew can you confirm this is resolved in 2.9.0-13.0.dev? It seems like it's working on my end now.

Yup! It started working as of the last time I checked, ~last week. Thanks!

Awesome! Thanks for confirming!

Was this page helpful?
0 / 5 - 0 ratings