-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[dartdev] Could not find dart. Have you built the full Dart SDK?
on dart build
#56080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Adds Apple clang flags for compiling Objective-C with the `CBuilder`. Issue: * #1227 Also pins the dev CI to the latest working version: * dart-lang/sdk#56080
This was changed because google3 makes heavy use of symlinks and CLI artifacts were never guaranteed to be in the same directory as the CLI executable after the symlinks were resolved. Let me take a look, hopefully this is a simple fix. |
@dcharkes, I'm unable to reproduce at HEAD: bkonyi@bkonyi-glinux:~/dart-sdk/sdk/third_party/pkg/native/pkgs/native_assets_cli/example/build/native_add_app$ echo $DART_RELEASE
/usr/local/google/home/bkonyi/dart-sdk/sdk/out/ReleaseX64/dart-sdk/bin/dart
bkonyi@bkonyi-glinux:~/dart-sdk/sdk/third_party/pkg/native/pkgs/native_assets_cli/example/build/native_add_app$ $DART_RELEASE --enable-experiment=native-assets build bin/native_add_app.dart
Deleting output directory: /usr/local/google/home/bkonyi/dart-sdk/sdk/third_party/pkg/native/pkgs/native_assets_cli/example/build/native_add_app/bin/native_add_app/.
Building native assets.
Writing native_assets.yaml.
Copying 1 build assets: (package:native_add_library/native_add_library.dart)
Generated: /usr/local/google/home/bkonyi/dart-sdk/sdk/third_party/pkg/native/pkgs/native_assets_cli/example/build/native_add_app/bin/native_add_app/native_add_app.exe Does this SDK need to be downloaded for the issue to be reproduced? |
I'm also unable to reproduce with |
It's reliably reproducing on the GitHub CI downloading the SDK, see the links in the linked issue. I haven't tried locally. |
Without more insights into the environment (e.g., the directory structure and contents of the unzipped SDK in the context of the GitHub CI), there's unfortunately not much we can do without a reproduction. If there's symlinks involved, that could be problematic, but |
Hm, maybe we should be using FileSystemEntity.typeSync instead of |
Ah that could be the case. The code itself that is failing is fairly simple right. Unless someone messed with the current directory that should always be true (except for when it's a symlink as you point out). It's worth giving it a shot. I don't know how to test this other than landing it, waiting for a dev build and turning the CI back to the latest dev build. |
…on to Files Related issue: #56080 Change-Id: I9b630ea3488e3f030cd92c593a4ee3bb4d718dd7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373380 Reviewed-by: Daco Harkes <dacoharkes@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com> Auto-Submit: Ben Konyi <bkonyi@google.com>
@bkonyi it seems to be still failing on
https://github.com/dart-lang/native/actions/runs/9853109946/job/27202956400?pr=1271 So the fix unfortunately didn't work.
In this case it's not a different CLI artifact, it's if (!Sdk.checkArtifactExists(genKernel) ||
!Sdk.checkArtifactExists(genSnapshot) ||
!Sdk.checkArtifactExists(sdk.dart)) { It's also weird that apparently it is able to find genKernel and genSnapshot. |
We do own the setup action: https://github.com/dart-lang/setup-dart Maybe someone who contributed to that knows how GitHub uses symlinks. cc @devoncarew |
…art' when run from PATH Fixes #56080 TEST=new test added Change-Id: I301b6959e372c2ad8b72ce055645b5affce5516e Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/376860 Cherry-pick-request: #56303 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377140 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Siva Annamalai <asiva@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
… to find the 'dart' when run from PATH" This reverts commit 708f487. Reason for revert: sdk_from_path_test is failing on Windows configurations. Original change's description: > [beta] [ CLI ] Fix issue where 'dart build' would fail to find the 'dart' when run from PATH > > Fixes #56080 > > TEST=new test added > Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/376860 Cherry-pick-request: #56303 Change-Id: I378f4d128674d216382e60eadc9181220ba872de No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377264 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Siva Annamalai <asiva@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Siva Annamalai <asiva@google.com> Auto-Submit: Ben Konyi <bkonyi@google.com>
The fix for this CL should be cherry-picked into beta/stable when the window opens again. |
… return 'dart' When running the VM from PATH using 'dart', Platform.executable could report the process name as 'dart' instead of 'dart.exe'. This change updates dartdev to handle this case so the checkArtifactExists call doesn't fail to find the 'dart' binary. Fixes #56306 [stable] [ CLI ] Fix issue where 'dart build' would fail to find the 'dart' when run from PATH Fixes #56080 Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/377542, https://dart-review.googlesource.com/c/sdk/+/376860 Cherry-pick-request: #56500 Change-Id: Ic30145309a307204d83353759d7b6c5da07faaa8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381041 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Derek Xu <derekx@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
After 8e00ebc the following code started failing:
sdk/pkg/dartdev/lib/src/commands/build.dart
Line 70 in a8314da
sdk.dart
was recently changed: fromPlatform.resolvedExecutable
toPlatform.executable
. Why was it changed @bkonyi?The error only shows up when downloading a dev build of the SDK, not when running the tests with an SDK from the
out/
orxcodebuild/
directory.dart build exe
failing for example on 3.5.0-243.0.dev native#1232I believe using
Platform.resolvedExecutable
should make things working again. However, I'm open to other solutions if the build command is holding things the wrong way.The text was updated successfully, but these errors were encountered: