Omit hardcoded --packages=.dart_tool/package_config.json
. (#160982)
Closes https://github.com/flutter/flutter/issues/160219.
This hard-coded package configuration is no longer strictly correct
as-of Dart 3.6.0; a pub _workspace_
(https://dart.dev/tools/pub/workspaces) can appear at a higher-level
than a package, and if the package is part of the workspace, tooling is
expected to (automatically) find `.dart_tool/package_config.json` at a
higher-level.
For example, the _engine_ sub-repo uses a
[workspace](9fd5bddc65/engine/src/flutter/pubspec.yaml (L82)
),
which means that, for example,
`%ENGINE%/tools/engine_tool/.dart_tool/package_config.json` will _never_
exist (it will be at `%ENGINE%/.dart_tools/package_config.json`.
As currently defined, the test-golden comparator interface will fail
with a package that uses workspaces. By removing the flag (and letting
automatic `--packages` resolution occur), I _believe_ the problem is
automatically resolved (but I'll let CI prove that for us).
This commit is contained in:
parent
a6c057c406
commit
0c3359df8c
@ -112,7 +112,6 @@ final class TestGoldenComparator {
|
|||||||
_flutterTesterBinPath,
|
_flutterTesterBinPath,
|
||||||
'--disable-vm-service',
|
'--disable-vm-service',
|
||||||
'--non-interactive',
|
'--non-interactive',
|
||||||
'--packages=${_fileSystem.path.join('.dart_tool', 'package_config.json')}',
|
|
||||||
output,
|
output,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -396,13 +396,7 @@ void main() {
|
|||||||
() async {
|
() async {
|
||||||
processManager.addCommand(
|
processManager.addCommand(
|
||||||
const FakeCommand(
|
const FakeCommand(
|
||||||
command: <String>[
|
command: <String>['flutter_tester', '--disable-vm-service', '--non-interactive', ''],
|
||||||
'flutter_tester',
|
|
||||||
'--disable-vm-service',
|
|
||||||
'--non-interactive',
|
|
||||||
'--packages=.dart_tool/package_config.json',
|
|
||||||
'',
|
|
||||||
],
|
|
||||||
stdout: '{"success": true}\n',
|
stdout: '{"success": true}\n',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -222,7 +222,6 @@ FakeCommand _fakeFluterTester(
|
|||||||
pathToBinTool,
|
pathToBinTool,
|
||||||
'--disable-vm-service',
|
'--disable-vm-service',
|
||||||
'--non-interactive',
|
'--non-interactive',
|
||||||
'--packages=.dart_tool/package_config.json',
|
|
||||||
'compiler_output',
|
'compiler_output',
|
||||||
],
|
],
|
||||||
stdout: stdout,
|
stdout: stdout,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user