Comments (9)
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.
from sdk.
@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?
from sdk.
I'm also unable to reproduce with 3.5.0-243.0.dev
downloaded from the SDK archives page.
from sdk.
Does this SDK need to be downloaded for the issue to be reproduced?
It's reliably reproducing on the GitHub CI downloading the SDK, see the links in the linked issue. I haven't tried locally.
from sdk.
Does this SDK need to be downloaded for the issue to be reproduced?
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 checkArtifactExists
should be able to follow them.
from sdk.
Hm, maybe we should be using FileSystemEntity.typeSync instead of File.existsSync
, which appears like it might return false
if we're checking the path to a Link
object.
from sdk.
Hm, maybe we should be using FileSystemEntity.typeSync instead of
File.existsSync
, which appears like it might returnfalse
if we're checking the path to aLink
object.
Ah that could be the case.
The code itself that is failing is fairly simple right. Platform.executable
or Platform.resolvedExecutable
and then checkArtifactExists
that does File(path).existsSync()
.
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.
from sdk.
@bkonyi it seems to be still failing on 3.6.0-12.0.dev
:
Run dart --enable-experiment=native-assets build bin/native_add_app.dart
dart --enable-experiment=native-assets build bin/native_add_app.dart
shell: /usr/bin/bash -e {0}
env:
DART_HOME: /opt/hostedtoolcache/dart/3.6.0-12.0.dev/x64
PUB_CACHE: /home/runner/.pub-cache
Could not find dart. Have you built the full Dart SDK?
Error: Process completed with exit code 255.
https://github.com/dart-lang/native/actions/runs/9853109946/job/27202956400?pr=1271
So the fix unfortunately didn't work.
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.
In this case it's not a different CLI artifact, it's dart
itself.
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.
from sdk.
Does this SDK need to be downloaded for the issue to be reproduced?
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
checkArtifactExists
should be able to follow them.
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
from sdk.
Related Issues (20)
- [CP] [ CLI ] Fix issue where 'dart build' would fail to find the 'dart' when run from PATH HOT 7
- `String.fromCharCode[s]` should be deprecated and renamed to `String.fromRune[s]` HOT 4
- "Error: The macro can only be applied to enums or enum values." - What interface to use instead? HOT 1
- Failures on [ CLI ] Fix issue where 'dart build' would fail to find the 'dart' when run from PATH
- Analyzer response to LSP requests extremely slow w/ high latency reported HOT 9
- [breaking change] On Windows refer to special `null` file as '\\?\nul' rather than 'nul'. HOT 7
- LSP Server fails to initialize if an inlayHints request is sent before the client responds to workspace/configuration HOT 23
- DateTime implementation on linux, dates before year 2020 return incorrect timezone HOT 8
- Inconsistent behavior of beginToken for some analyzer AST nodes with doc comments HOT 1
- [dart2js] Incorrect inference for override with default of widened type
- [ddc] Incorrect defaulting of named arguments with certain names
- DDC async function stepping improvements HOT 1
- When performing floating-point calculations, precision may be lost在进行浮点数计算时精度会丢失 HOT 7
- [typed_data] Add `Float16List` + [vm/ffi] Add `Float16` HOT 15
- Code completion contains many duplicated items (for extensions?)
- dart2wasm miscompilation around dynamic switch targets HOT 1
- Unexpected TypeError from js_interop only in DDC HOT 1
- Maybe ZoneSpecification's fork behavior is broken? HOT 3
- Attempt to start the daemon using the IPv6 loopback if the machine does not have 127.0.0.1 loopback IP address
- [ddc] Can we migrate all calls of `getReifiedType()` to a member of the dart:rti library?
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.