Skip to content

Commit

Permalink
Prepare for release 2.42.0 (#8673)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliette authored Jan 7, 2025
1 parent 61fc726 commit 8762b31
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 92 deletions.
2 changes: 1 addition & 1 deletion flutter-candidate.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2eee054d41f641db335f35797d39fc77ed124430
434ca754e3b972725938d72b83bfa84f083fb0a7
2 changes: 1 addition & 1 deletion packages/devtools_app/benchmark/web_bundle_size_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:path/path.dart' as path;
import 'package:test/test.dart';

// Benchmark size in kB.
const bundleSizeBenchmark = 5200;
const bundleSizeBenchmark = 5400;
const gzipBundleSizeBenchmark = 1550;

void main() {
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_app/lib/devtools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
/// Note: a regexp in the `dt update-version' command logic matches the constant
/// declaration `const version =`. If you change the declaration you must also
/// modify the regex in the `dt update-version' command logic.
const version = '2.42.0-dev.1';
const version = '2.42.0';
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ class ProgramExplorerController extends DisposableController
final targetScript = switch (object) {
ClassRef(:final location?) ||
FieldRef(:final location?) ||
FuncRef(:final location?) =>
location.script,
FuncRef(:final location?) => location.script,
Code(:final function?) => function.location?.script,
ScriptRef() => object,
_ => null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,7 @@ class VMServiceObjectNode extends TreeNode<VMServiceObjectNode> {
final sourceLocation = switch (object) {
FieldRef(:final location) ||
FuncRef(:final location) ||
ClassRef(:final location) =>
location,
ClassRef(:final location) => location,
_ => null,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1254,13 +1254,10 @@ class _CpuProfileTimelineTree {
String? get resolvedUrl =>
isCodeTree && _function is vm_service.FuncRef?
?
// TODO(bkonyi): not sure if this is a resolved URL or not, but it's not
// critical since this is only displayed when VM developer mode is
// enabled.
(_function as vm_service.FuncRef?)
?.location
?.script
?.uri
// TODO(bkonyi): not sure if this is a resolved URL or not, but it's not
// critical since this is only displayed when VM developer mode is
// enabled.
(_function as vm_service.FuncRef?)?.location?.script?.uri
: samples.functions![index].resolvedUrl;

int? get sourceLine {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class InboundReferencesTreeNode extends TreeNode<InboundReferencesTreeNode> {
}

return switch (objectRef) {
ClassRef(:final name) || FuncRef(:final name) || FieldRef(:final name) =>
name,
ClassRef(:final name) ||
FuncRef(:final name) ||
FieldRef(:final name) => name,
LibraryRef(:final name, :final uri) => name.isNullOrEmpty ? uri : name,
ScriptRef(:final uri) => fileNameFromUri(uri),
InstanceRef(:final name, :final classRef) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@ class VmServiceObjectLink extends StatelessWidget {
FieldRef(:final name) ||
FuncRef(:final name) ||
CodeRef(:final name) ||
TypeArgumentsRef(:final name) =>
name,
TypeArgumentsRef(:final name) => name,
// If a class has an empty name, it's a special "top level" class.
ClassRef(:final name) => name!.isEmpty ? 'top-level-class' : name,
LibraryRef(:final uri, :final name) =>
Expand Down
24 changes: 11 additions & 13 deletions packages/devtools_app/lib/src/shared/charts/chart_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,17 @@ class ChartController extends DisposableController
if (lastDT.difference(firstDT).inMinutes >= duration.inMinutes) {
// Grab the duration in minutes passed in.
final startOfLastNMinutes =
// We need this cast to be able to return null if nothing is found.
// ignore: unnecessary_cast
timestamps
.reversed
.firstWhereOrNull((timestamp) {
final currentDT = DateTime.fromMillisecondsSinceEpoch(timestamp);
final diff = lastDT.difference(currentDT);
if (diff.inMinutes >= duration.inMinutes) {
return true;
}

return false;
});
// We need this cast to be able to return null if nothing is found.
// ignore: unnecessary_cast
timestamps.reversed.firstWhereOrNull((timestamp) {
final currentDT = DateTime.fromMillisecondsSinceEpoch(timestamp);
final diff = lastDT.difference(currentDT);
if (diff.inMinutes >= duration.inMinutes) {
return true;
}

return false;
});

final ticksVisible =
startOfLastNMinutes != null
Expand Down
4 changes: 3 additions & 1 deletion packages/devtools_app/lib/src/shared/framework/screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ abstract class Screen {
size:
iconAsset != null
// Add 1.0 to adjust for margins on the screen icon assets.
? scaleByFontFactor(defaultIconSizeBeforeScaling + 1.0)
? scaleByFontFactor(
defaultIconSizeBeforeScaling + 1.0,
)
: defaultIconSize,
),
if (title.isNotEmpty)
Expand Down
3 changes: 1 addition & 2 deletions packages/devtools_app/lib/src/shared/memory/classes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ class SingleClassData extends ClassData {

@override
// ignore: avoid-explicit-type-declaration, required to override base class.
final ObjectSet
objects = ObjectSet();
final ObjectSet objects = ObjectSet();

@override
final byPath = <PathFromRoot, ObjectSetStats>{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,10 @@ class SidebarDevToolsScreens extends StatelessWidget {
ScreenMetaData.debugger ||
ScreenMetaData.vmTools ||
// This screen will be removed from the first party DevTools screens soon.
// If the user depends on package:provider, the provider extension should
// show up in the DevTools extensions list instead.
ScreenMetaData
.provider ||
ScreenMetaData.simple =>
false,
// If the user depends on package:provider, the provider extension should
// show up in the DevTools extensions list instead.
ScreenMetaData.provider ||
ScreenMetaData.simple => false,
_ => true,
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: none

# Note: this version should only be updated by running the 'dt update-version'
# command that updates the version here and in 'devtools.dart'.
version: 2.42.0-dev.1
version: 2.42.0

repository: https://github.com/flutter/devtools/tree/master/packages/devtools_app

Expand Down
40 changes: 0 additions & 40 deletions packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,6 @@ To learn more about DevTools, check out the
* Enabled auto-refreshes of the widget tree on hot-reloads and navigation events by default. This can be disabled in the inspector settings. - [#8646](https://github.com/flutter/devtools/pull/8646)
![Auto-refresh setting](images/inspector_auto_refresh_setting.png "Inspector auto-refresh setting")

## Performance updates

TODO: Remove this section if there are not any general updates.

## CPU profiler updates

TODO: Remove this section if there are not any general updates.

## Memory updates

TODO: Remove this section if there are not any general updates.

## Debugger updates

TODO: Remove this section if there are not any general updates.

## Network profiler updates

TODO: Remove this section if there are not any general updates.

## Logging updates

TODO: Remove this section if there are not any general updates.

## App size tool updates

TODO: Remove this section if there are not any general updates.

## Deep links tool updates

TODO: Remove this section if there are not any general updates.

## VS Code Sidebar updates

TODO: Remove this section if there are not any general updates.

## DevTools Extension updates

TODO: Remove this section if there are not any general updates.

## Full commit history

To find a complete list of changes in this release, check out the
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ class FakeHeapSnapshotGraph extends Fake implements HeapSnapshotGraph {

@override
// ignore: avoid-explicit-type-declaration, required to override base class.
final List<HeapSnapshotClass>
classes = <HeapSnapshotClass>[
final List<HeapSnapshotClass> classes = <HeapSnapshotClass>[
_FakeHeapSnapshotClass(),
_FakeHeapSnapshotClass.weak(),
];

@override
// ignore: avoid-explicit-type-declaration, required to override base class.
final List<FakeSnapshotObject>
objects = <FakeSnapshotObject>[
final List<FakeSnapshotObject> objects = <FakeSnapshotObject>[
_sentinelObject,
FakeSnapshotObject(shallowSize: 1), // root
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ class FakeServiceManager extends Fake

@override
// ignore: avoid-explicit-type-declaration, required to override base class.
final FakeServiceExtensionManager
serviceExtensionManager = FakeServiceExtensionManager();
final FakeServiceExtensionManager serviceExtensionManager =
FakeServiceExtensionManager();

@override
ConnectedApp? connectedApp = MockConnectedApp();
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 @@ -10,7 +10,7 @@ import '../utils.dart';

/// Runs the DevTools web app in debug mode with `flutter run` and connects it
/// to a locally running instance of the DevTools server.
///
///
/// To open a debug connection to the DevTools server, pass the `--debug-server`
/// flag to this command.
class RunCommand extends Command {
Expand Down
8 changes: 4 additions & 4 deletions tool/lib/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ class DevToolsRepo {
} else {
final ancestor = result.firstWhereOrNull(
(p) =>
// Remove the last segment of [dir]'s pathSegments to ensure we
// are only checking ancestors and not sibling directories with
// similar names.
(List.from(dir.uri.pathSegments)..safeRemoveLast())
// Remove the last segment of [dir]'s pathSegments to ensure we
// are only checking ancestors and not sibling directories with
// similar names.
(List.from(dir.uri.pathSegments)..safeRemoveLast())
// TODO(kenz): this may cause issues for Windows paths.
.join('/')
.startsWith(p.packagePath),
Expand Down

0 comments on commit 8762b31

Please sign in to comment.