dart-sdk/pkg/dartdev
Ben Konyi 8e00ebc689 [ CLI ] Fix snapshot detection logic for google3
google3 makes heavy use of symlinks, with no guarantee that the relative
location of files with respect to each other will be maintained after
the symlinks are resolved. This causes issues when trying to locate the
DartDev snapshot using the VM executables resolved path as a base.

This change updates the DartDev snapshot detection logic to first try to
find the snapshot using the resolved executable path before falling back
to using the unresolved path used to launch the VM (e.g., the path
specified by argv[0]).

TEST=pkg/dartdev/test/

Change-Id: I19a41c440ac82cbc671dafb3bda23a31fb4cdc0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370000
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-06-06 19:10:19 +00:00
..
bin Close pub http client in finally block 2024-04-11 13:53:08 +00:00
doc Link to dart fix docs 2023-10-26 14:13:43 +00:00
lib [ CLI ] Fix snapshot detection logic for google3 2024-06-06 19:10:19 +00:00
test [dartdev] Add --depfile option to dart compile 2024-05-23 12:58:29 +00:00
tool [dartdev] Avoid unnecessary uses of late 2024-05-30 14:55:21 +00:00
.gitignore rev the build of devtools; add a 'dart devtools' command 2021-08-20 16:25:24 +00:00
analysis_options.yaml [pkg] remove duplicate config from the analysis options files 2023-11-14 00:37:53 +00:00
CHANGELOG.md
LICENSE Update LICENSE 2021-04-07 10:28:38 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
pubspec.yaml pkg/dartdev: drop pkg:usage 2024-04-18 15:51:34 +00:00
README.md pkg/dartdev: fix readme link 2022-11-09 03:12:26 +00:00

Dart CLI tooling

A command-line utility for Dart development.

Usage: dart [vm-options] <command|dart-file> [arguments]

Global options:
-h, --help                 Print this usage information.
-v, --verbose              Show additional command output.
    --version              Print the Dart SDK version.
    --enable-analytics     Enable analytics.
    --disable-analytics    Disable analytics.

Available commands:
  analyze   Analyze the project's Dart code.
  compile   Compile Dart to various formats.
  create    Create a new project.
  format    Idiomatically format Dart source code.
  pub       Work with packages.
  run       Run a Dart program.
  test      Run tests in this package.

Run "dart help <command>" for more information about a command.
See https://dart.dev/tools/dart-tool for detailed documentation.

Contributing

If you'd like to contribute to the Dart CLI tool, please start by reading the contribution guidelines for the Dart project. Then familiarize yourself with the design principles that guide this tool's UX.

Features and bugs

Please file feature requests and bugs in the Dart SDK issue tracker with label area-dart-cli.