Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
version: "1.4.0"
version: "1.4.1"
checked_yaml:
dependency: transitive
description:
Expand Down
34 changes: 29 additions & 5 deletions tool/RELEASE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,37 @@ version bumps.

### 3) Test the release PR

1. Build DevTools in release mode and serve it from a locally running DevTools
server instance:
1. Build the Dart SDK locally

```shell
cd $LOCAL_DART_SDK && \
gclient sync -D && \
./tools/build.py -mrelease create_sdk;
```

2. Copy the newly-built Dart executable path.
- for Macs with ARM-based processors (M chips):
```shell
xcodebuild/ReleaseARM64/dart-sdk/bin/dart devtools
```
- for Macs with x64-based processors (Intel chips):
```shell
xcodebuild/ReleaseX64/dart-sdk/bin/dart devtools
```

- For non-Macs:
```shell
out/ReleaseX64/dart-sdk/bin/dart devtools
```

3. Build DevTools in release mode and serve it from a locally running DevTools
server instance using the executable path you just copied, e.g.:

```shell
dt serve
dt serve --dart-sdk-override=$LOCAL_DART_SDK/xcodebuild/ReleaseARM64/dart-sdk/bin/dart
```

2. Launch DevTools and verify that everything generally works.
4. Launch DevTools and verify that everything generally works.
- open the page in a browser (http://localhost:53432)
- `flutter run` an application
- connect to the running app from DevTools
Expand All @@ -147,7 +171,7 @@ server instance:
- the bug fixes,
- use this commit hash for the following steps.

3. Once the build is in good shape,
5. Once the build is in good shape,
- revert any local changes.
```shell
git checkout . && \
Expand Down
2 changes: 1 addition & 1 deletion tool/lib/commands/run.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RunCommand extends Command {
RunCommand() {
argParser
..addDebugServerFlag()
..addServeWithSdkOption();
..addDartSdkOverrideOption();
}

@override
Expand Down
16 changes: 8 additions & 8 deletions tool/lib/commands/serve.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ServeCommand extends Command {
' directly from the DevTools server.',
)
..addDebugServerFlag()
..addServeWithSdkOption()
..addDartSdkOverrideOption()
..addUpdateFlutterFlag()
..addUpdatePerfettoFlag()
..addPubGetFlag()
Expand Down Expand Up @@ -154,12 +154,13 @@ class ServeCommand extends Command {
results[SharedCommandArgs.updatePerfetto.flagName] as bool;
final useWasm = results[SharedCommandArgs.wasm.flagName] as bool;
final noStripWasm = results[SharedCommandArgs.noStripWasm.flagName] as bool;
final noMinifyWasm = results[SharedCommandArgs.noMinifyWasm.flagName] as bool;
final noMinifyWasm =
results[SharedCommandArgs.noMinifyWasm.flagName] as bool;
final runPubGet = results[SharedCommandArgs.pubGet.flagName] as bool;
final devToolsAppBuildMode =
results[SharedCommandArgs.buildMode.flagName] as String;
final serveWithDartSdk =
results[SharedCommandArgs.serveWithDartSdk.flagName] as String?;
final dartSdkOverride =
results[SharedCommandArgs.dartSdkOverride.flagName] as String?;
final forMachine = results[_machineFlag] as bool;

// TODO(https://github.com/flutter/devtools/issues/8643): Support running in
Expand Down Expand Up @@ -193,7 +194,7 @@ class ServeCommand extends Command {
)
..removeWhere(
(element) => element.startsWith(
valueAsArg(SharedCommandArgs.serveWithDartSdk.flagName),
valueAsArg(SharedCommandArgs.dartSdkOverride.flagName),
),
);

Expand Down Expand Up @@ -240,10 +241,9 @@ class ServeCommand extends Command {
}
logStatus('completed building DevTools: $devToolsBuildLocation');
}

logStatus('running pub get for DDS in the local dart sdk');
await processManager.runProcess(
CliCommand.dart(['pub', 'get']),
CliCommand.dart(['pub', 'get'], sdkOverride: dartSdkOverride),
workingDirectory: path.join(localDartSdkLocation, 'pkg', 'dds'),
);

Expand Down Expand Up @@ -304,7 +304,7 @@ class ServeCommand extends Command {
// to pass `--machine` (etc.) so that this script can behave the same as
// the "dart devtools" command for testing local DevTools/server changes.
...remainingArguments,
], sdkOverride: serveWithDartSdk);
], sdkOverride: dartSdkOverride);
if (forMachine) {
// If --machine flag is true, then the output is a tool-readable JSON.
// Therefore, skip reading the process output and instead just run the
Expand Down
6 changes: 3 additions & 3 deletions tool/lib/commands/shared.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ extension BuildCommandArgsExtension on ArgParser {
);
}

void addServeWithSdkOption() {
void addDartSdkOverrideOption() {
addOption(
SharedCommandArgs.serveWithDartSdk.flagName,
SharedCommandArgs.dartSdkOverride.flagName,
help: 'Uses the specified Dart SDK to serve the DevTools server',
valueHelp:
'/Users/me/absolute_path_to/sdk/xcodebuild/ReleaseX64/dart-sdk/bin/dart',
Expand All @@ -122,7 +122,7 @@ enum SharedCommandArgs {
noStripWasm('no-strip-wasm'),
noMinifyWasm('no-minify-wasm'),
runApp('run-app'),
serveWithDartSdk('serve-with-dart-sdk'),
dartSdkOverride('dart-sdk-override'),
updateFlutter('update-flutter'),
updateOnPath('update-on-path'),
updatePerfetto('update-perfetto');
Expand Down
Loading