Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT

* Updates shared preferences devtools extension dependencies
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartmorgan-g should I actually update the version?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is subject to our standard versioning policy.

* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
* Updates README to reflect currently supported OS versions for the latest
versions of the endorsed platform implementations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:convert';

import 'package:devtools_app_shared/service.dart';
import 'package:devtools_app_shared/utils.dart';
import 'package:vm_service/vm_service.dart';

import 'shared_preferences_state.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ publish_to: 'none'
version: 1.0.1

environment:
sdk: ^3.8.0
sdk: ^3.9.0

dependencies:
devtools_app_shared: ^0.3.0
devtools_extensions: ^0.3.0
devtools_app_shared: ^0.4.0
devtools_extensions: ^0.4.0
flutter:
sdk: flutter
vm_service: '>=14.3.0 <16.0.0'

dev_dependencies:
build_runner: ^2.4.10
build_runner: ^2.10.4
flutter_test:
sdk: flutter
mockito: 5.4.4
mockito: 5.6.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What new build_runner and mockito features are you using that require narrowing the compatible version range?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none, just felt like updating them since I was already updating devtools_app_shared and devtools_extensions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. I can remove the updates, but I don't think they fall in either pushing transitive dependency and version lock issues. These are dev_dependencies and this package (shared_preference_tool) is actually a stand alone web app that is build and bundled to be used by DevTools. This will not affect the client's dependency tree at all.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think they fall in either pushing transitive dependency and version lock issues.

I'm aware that the two specific examples listed there don't apply here, but those are just common examples. The policy is the first sentence:

Our general policy is not to update the minimum version of a dependency beyond what the package requires.

This will not affect the client's dependency tree at all.

Sure, but it's still artificially narrowing the range of possible resolution. The policy isn't that we artificially narrow ranges by default unless there's a specific downside, it's that we don't narrow ranges unless there's a specific reason to do so.

I just noticed that this is still using a pinned version of mockito though, which we don't need to do any more; I thought we updated all instances of that, but maybe the PR to add this package was still in flight when that happened. It would be good to change this to ^5.4.4 instead of 5.4.4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Gonna unpin the version.

it's that we don't narrow ranges unless there's a specific reason to do so.

Got it! It makes sense. I'll revert this and unpin the version. This will also remove the generated code changes.


flutter:
uses-material-design: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Mocks generated by Mockito 5.4.4 from annotations
// Mocks generated by Mockito 5.4.6 from annotations
// in shared_preferences_tool/test/src/shared_preferences_state_notifier_test.dart.
// Do not manually edit this file.

Expand All @@ -21,10 +21,12 @@ import 'package:shared_preferences_tool/src/shared_preferences_tool_eval.dart'
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member

class _FakeCompleter_0<T> extends _i1.SmartFake implements _i2.Completer<T> {
_FakeCompleter_0(Object parent, Invocation parentInvocation)
Expand Down Expand Up @@ -120,12 +122,6 @@ class MockConnectedApp extends _i1.Mock implements _i6.ConnectedApp {
)
as _i2.Completer<bool>);

@override
set initialized(_i2.Completer<bool>? _initialized) => super.noSuchMethod(
Invocation.setter(#initialized, _initialized),
returnValueForMissingStub: null,
);

@override
bool get connectedAppInitialized =>
(super.noSuchMethod(
Expand Down Expand Up @@ -222,6 +218,12 @@ class MockConnectedApp extends _i1.Mock implements _i6.ConnectedApp {
)
as bool);

@override
set initialized(_i2.Completer<bool>? value) => super.noSuchMethod(
Invocation.setter(#initialized, value),
returnValueForMissingStub: null,
);

@override
_i2.Future<void> initializeValues({void Function()? onComplete}) =>
(super.noSuchMethod(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import 'dart:async';

import 'package:devtools_app_shared/service.dart';
import 'package:devtools_app_shared/utils.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:shared_preferences_tool/src/shared_preferences_state.dart';
import 'package:shared_preferences_tool/src/shared_preferences_tool_eval.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ void main() {
Future<void> pumpDataPanel(WidgetTester tester) {
return tester.pumpWidget(
DevToolsExtension(
requiresRunningApplication: false,
child: InnerSharedPreferencesStateProvider(
notifier: notifierMock,
child: const DataPanel(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ void main() {

await tester.pumpWidget(
DevToolsExtension(
requiresRunningApplication: false,
child: Directionality(
textDirection: TextDirection.ltr,
child: ErrorPanel(error: error, stackTrace: stackTrace),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ void main() {
Future<void> pumpKeysPanel(WidgetTester tester) {
return tester.pumpWidget(
DevToolsExtension(
requiresRunningApplication: false,
child: InnerSharedPreferencesStateProvider(
notifier: notifierMock,
child: const KeysPanel(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ void main() {

await tester.pumpWidget(
DevToolsExtension(
requiresRunningApplication: false,
child: InnerSharedPreferencesStateProvider(
notifier: notifier,
child: const SharedPreferencesBody(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Mocks generated by Mockito 5.4.4 from annotations
// Mocks generated by Mockito 5.4.6 from annotations
// in shared_preferences_tool/test/test_helpers/notifier_mocking_helpers.dart.
// Do not manually edit this file.

Expand All @@ -20,10 +20,12 @@ import 'package:shared_preferences_tool/src/shared_preferences_state_notifier.da
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member

class _FakeSharedPreferencesState_0 extends _i1.SmartFake
implements _i2.SharedPreferencesState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,8 @@

<title>shared_preferences_tool</title>
<link rel="manifest" href="manifest.json">

<script>
// The value below is injected by flutter build, do not touch.
const serviceWorkerVersion = null;
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>
<body>
<script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
engineInitializer.initializeEngine().then(function(appRunner) {
appRunner.runApp();
});
}
});
});
</script>
<script src="flutter_bootstrap.js" async></script>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also updated this, which was also a deprecation.

</body>
</html>