Skip to content

Commit 33a0cdd

Browse files
authored
[hooks_runner] Remove package_graph.json fallback (#2266)
1 parent f9b7199 commit 33a0cdd

File tree

8 files changed

+13
-29
lines changed

8 files changed

+13
-29
lines changed

pkgs/code_assets/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ dev_dependencies:
2727
custom_lint: ^0.7.5
2828
dart_flutter_team_lints: ^3.5.1
2929
json_schema: ^5.2.0
30-
repo_lint_rules:
31-
path: ../repo_lint_rules/
30+
repo_lint_rules: 0.1.0-wip
3231
test: ^1.25.15

pkgs/data_assets/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ dev_dependencies:
2323
custom_lint: ^0.7.5
2424
dart_flutter_team_lints: ^3.5.1
2525
json_schema: ^5.2.0
26-
repo_lint_rules:
27-
path: ../repo_lint_rules/
26+
repo_lint_rules: 0.1.0-wip
2827
test: ^1.25.15

pkgs/hooks/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ dev_dependencies:
3838
json_syntax_generator:
3939
path: ../json_syntax_generator/
4040
path: ^1.9.1
41-
repo_lint_rules:
42-
path: ../repo_lint_rules/
41+
repo_lint_rules: 0.1.0-wip
4342
test: ^1.25.15

pkgs/hooks_runner/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.19.1-wip
2+
3+
- Remove `package_graph.json` fallback.
4+
15
## 0.19.0
26

37
- Renamed package from `native_assets_builder` to `hooks_runner`.

pkgs/hooks_runner/lib/src/build_runner/build_planner.dart

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'dart:convert';
6-
import 'dart:io' show Process;
76

87
import 'package:file/file.dart';
98
import 'package:graphs/graphs.dart' as graphs;
@@ -39,21 +38,8 @@ class NativeAssetsBuildPlanner {
3938
final packageGraphJsonFile = fileSystem.file(
4039
packageConfigUri.resolve('package_graph.json'),
4140
);
42-
final String packageGraphJson;
43-
if (packageGraphJsonFile.existsSync()) {
44-
packageGraphJson = await packageGraphJsonFile.readAsString();
45-
} else {
46-
// TODO: Either bump SDK constraint to dev release (but we can't while
47-
// flutter_tools requires published stable packages). Or wait for Dart 3.8
48-
// to be released to remove this fallback.
49-
final workingDirectory = packageConfigUri.resolve('../');
50-
final result = await Process.run(
51-
dartExecutable.toFilePath(),
52-
['pub', 'deps', '--json'],
53-
workingDirectory: workingDirectory.toFilePath(),
54-
);
55-
packageGraphJson = result.stdout as String;
56-
}
41+
assert(packageGraphJsonFile.existsSync());
42+
final packageGraphJson = await packageGraphJsonFile.readAsString();
5743
final packageGraph = PackageGraph.fromPackageGraphJsonString(
5844
packageGraphJson,
5945
);

pkgs/hooks_runner/pubspec.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: hooks_runner
22
description: >-
33
This package is the backend that invokes build hooks.
44
5-
version: 0.19.0
5+
version: 0.19.1-wip
66

77
repository: https://github.com/dart-lang/native/tree/main/pkgs/hooks_runner
88

@@ -30,6 +30,5 @@ dev_dependencies:
3030
dart_flutter_team_lints: ^3.5.1
3131
data_assets: ^0.19.0 # Used in tests.
3232
file_testing: ^3.0.2
33-
repo_lint_rules:
34-
path: ../repo_lint_rules/
33+
repo_lint_rules: 0.1.0-wip
3534
test: ^1.25.15

pkgs/json_syntax_generator/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ dev_dependencies:
2121
custom_lint: ^0.7.5
2222
dart_flutter_team_lints: ^3.5.1
2323
path: ^1.9.1
24-
repo_lint_rules:
25-
path: ../repo_lint_rules/
24+
repo_lint_rules: 0.1.0-wip
2625
test: ^1.25.15

pkgs/native_toolchain_c/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ dev_dependencies:
2828
collection: ^1.19.1
2929
custom_lint: ^0.7.5
3030
dart_flutter_team_lints: ^3.5.1
31-
repo_lint_rules:
32-
path: ../repo_lint_rules/
31+
repo_lint_rules: 0.1.0-wip
3332
test: ^1.25.15

0 commit comments

Comments
 (0)