Comments (17)
Platform.executable
definitely doesn't do what I thought (I assumed it returned the path to the executable without resolving symlinks), so I'm going to revert this for now. See https://dart-review.googlesource.com/c/sdk/+/373381.
from sdk.
https://dart-review.googlesource.com/c/sdk/+/373381 has landed, closing this issue.
from sdk.
I've managed to track down the cause of the issue.
If the user has dart
on their PATH
and invokes dart compile js
(which spawns the VM service after compilation completes), the VM service would attempt to spawn DDS using ./dart
as the executable path instead of dart
. This would result in DDS failing to start since ./dart
didn't exist, causing the VM to print an error and hang.
The fix here is to check to see if the parent directory of Platform.executable
is .
and then verify if ./dart
exists or not. If it doesn't, dart
is likely on the user's PATH
and should be used directly as the executable path.
I have a CL almost ready for review that should resolve this issue and allow for relanding the reverted commit (see CL here).
from sdk.
@srujzs I'm unable to reproduce at HEAD and can't find 21ee651cc4ed07e5729d727dfbd5f15498bc31fd
. Can you please confirm the revision you're seeing this on?
from sdk.
I downloaded the latest main channel release from https://storage.googleapis.com/dart-archive/channels/main/raw/latest/sdk/dartsdk-macos-arm64-release.zip with --version
output Dart SDK version: 3.5.0-edge.4abd615d3279573ad4711995a545ed156da8a315 (main) (Wed Jun 26 17:18:17 2024 +0000) on "macos_arm64"
and dart compile js
works using it for me.
from sdk.
Actually, it looks Wed Jun 26 10:35:50 2024 -0700
is a bit newer than Wed Jun 26 17:18:17 2024 +0000
, so let me try building the SDK locally.
from sdk.
Ah apologies, that was with a local revert CL. I can repro with Dart SDK version: 3.5.0-edge.3180d9545360cfb176a90d45db48009cf1beb842 (main) (Tue Jun 25 21:12:28 2024 +0000) on "macos_arm64"
.
from sdk.
Ah apologies, that was with a local revert CL. I can repro with
Dart SDK version: 3.5.0-edge.3180d9545360cfb176a90d45db48009cf1beb842 (main) (Tue Jun 25 21:12:28 2024 +0000) on "macos_arm64"
.
@derekxu16 and I are both unable to reproduce with 3180d9545360cfb176a90d45db48009cf1beb842
. This is from a locally built SDK?
from sdk.
Yes. It looks like this is the cause (for me at least), which makes sense with the error:
Reverting that to resolvedExecutable
fixes the issue. It's possible that executable
gives us different behavior here.
from sdk.
Yes. It looks like this is the cause (for me at least), which makes sense with the error:
Reverting that to
resolvedExecutable
fixes the issue. It's possible thatexecutable
gives us different behavior here.
Are you using symlinks anywhere by any chance?
from sdk.
Not that I'm aware of. Does Platform.executable
give you a full path instead of just dart
on your machine?
from sdk.
Hm, good question... do you have dart
on your path at all? Maybe that's why I'm unable to reproduce.
from sdk.
Yup, I have this in my .bashrc
:
export PATH=$PATH:~/dart-sdk/sdk/xcodebuild/ReleaseARM64/dart-sdk/bin/
from sdk.
If the user has
dart
on theirPATH
and invokesdart compile js
(which spawns the VM service after compilation completes), the VM service would attempt to spawn DDS using./dart
as the executable path instead ofdart
. This would result in DDS failing to start since./dart
didn't exist, causing the VM to print an error and hang.
Does this spawning of VM service after compilation is done need to also attempt to spawn DDS ?
from sdk.
DDS is responsible for serving DevTools, so we probably want to spawn DDS when we can.
from sdk.
DDS is responsible for serving DevTools, so we probably want to spawn DDS when we can.
I agree but the command line 'dart compile js' does not imply start vm service for debugging, shouldn't 'dart --enable-vm-service compile js' be needed for that ?
from sdk.
DDS is responsible for serving DevTools, so we probably want to spawn DDS when we can.
I agree but the command line 'dart compile js' does not imply start vm service for debugging, shouldn't 'dart --enable-vm-service compile js' be needed for that ?
While that's true, there's currently no way to only enable the VM service without enabling DDS, and there could be functionality provided by DDS that developers want to utilize. If we want to provide a way to not start DDS, we'd need to add a named parameter to this API which I'm not sure we'd want to do.
from sdk.
Related Issues (20)
- [CP] [dart2wasm] Fix partial instantiation constants HOT 5
- "http/browser_client.dart" import causes tests to fail because of "http-1.2.2/lib/src/browser_client.dart:6:8: Error: Dart library 'dart:js_interop' is not available on this platform." HOT 3
- [Wildcard Variables] implement `THIS_ACCESS_FROM_FIELD_INITIALIZER` HOT 2
- dart2js: Internal Error: type 'InterfaceType' is not a subtype of type 'FunctionType' in type cast HOT 2
- DateTime.tryParse non consistent behavior across platforms HOT 1
- [Wildcard Variables][analyzer] Const wildcard variables have no errors when referenced HOT 2
- [Wildcard Variables][analyzer] Const wildcard functions have no errors when referenced HOT 1
- Internal error: Exception while using a AvoidRedundantArgumentValues to visit... HOT 1
- [Wildcard Variables][analyzer] Const wildcard initializer list variables should not accessed. HOT 1
- unintended_html_in_doc_comment triggers on some variants of allowed html tags in package:web HOT 1
- js_interop changes in 3.6 (master) to JSTypedArray subtypes break passing SharedArrayBuffer as the underlying buffer. HOT 3
- Dart analyzer fails to analyze condition in a list construction in enhanced enum constructor HOT 2
- [CP] Fix crashes due to unhandled StructuralParameterTypes in UP in the CFE HOT 1
- Macro with Map param doesn't work properly HOT 1
- [native assets] Add dynamic linking integration test for `dart` HOT 1
- Analyzer doesn't notice incorrect return type of generic method HOT 5
- [dart2wasm][ffi] Error: Argument to 'Native.addressOf' must be annotated with @Native. HOT 3
- [cfe/ffi] Cascading error on wrong types when using `.address` HOT 1
- Call dart function from a dynamic lib HOT 3
- [CP] Fix analysis_options.yaml "include:" for nested folders in workspace. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk.