Bump pub to 84895ca4c52df5ecc7dd4d439365c3045b7c2165

Changes:
```
> git log --format="%C(auto) %h %s" e184bfc..84895ca
 https://dart.googlesource.com/pub.git/+/84895ca4 Fix fast path check of ensureUpToDate (4271)
 https://dart.googlesource.com/pub.git/+/89e386bc Rewrite `getExecutableForCommand` tests to test with an external process. (4268)
 https://dart.googlesource.com/pub.git/+/7ab4020e Connect to _PUB_TEST_DEFAULT_HOSTED_URL instead of pub.dev when testing (4270)
 https://dart.googlesource.com/pub.git/+/c2592b3e Use lint unreachable_from_main to avoid dead code (4244)
 https://dart.googlesource.com/pub.git/+/a87b84dc Allow invoking `getExecutableForCommand` everywhere in workspace (4257)
 https://dart.googlesource.com/pub.git/+/a284c9b3 Remove debug logging statements (4267)

```

Diff: https://dart.googlesource.com/pub.git/+/e184bfc725793cbbf222fa8d8f96da10c40af24a..84895ca4c52df5ecc7dd4d439365c3045b7c2165/
Change-Id: I1eacbe85bd1016099575af06751205a94f988b3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367000
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
This commit is contained in:
Sigurd Meldgaard 2024-05-17 08:50:30 +00:00 committed by Commit Queue
parent 3b02e41af1
commit 57a7ad165e
3 changed files with 96 additions and 1 deletions

2
DEPS
View file

@ -169,7 +169,7 @@ vars = {
"path_rev": "9be79e72be7837fd8b99ae51a69f4c9f04ec29b4",
"pool_rev": "1a6f2df19d7a24baaf674e032a0310a4f76725de",
"protobuf_rev": "ccf104dbc36929c0f8708285d5f3a8fae206343e",
"pub_rev": "e184bfc725793cbbf222fa8d8f96da10c40af24a", # disable tools/rev_sdk_deps.dart
"pub_rev": "84895ca4c52df5ecc7dd4d439365c3045b7c2165", # disable tools/rev_sdk_deps.dart
"pub_semver_rev": "f57c9c31dfd4e45ce6b11f18ee388e526ba1792a",
"shelf_rev": "d9f82bf2cdd87e2878cfdc167aa41b9ce87a52d8",
"source_map_stack_trace_rev": "6834af5e9e4ba880741b1357a5967fee8d90827c",

View file

@ -547,6 +547,61 @@ void main(List<String> args) => print("$b $args");
expect(result.exitCode, 255);
});
test('workspace', () async {
final p = project(
sdkConstraint: VersionConstraint.parse('^3.5.0-0'),
pubspecExtras: {
'workspace': ['pkgs/a', 'pkgs/b']
});
p.file('pkgs/a/pubspec.yaml', '''
name: a
environment:
sdk: ^3.5.0-0
resolution: workspace
dependencies:
b:
''');
p.file('pkgs/b/pubspec.yaml', '''
name: b
environment:
sdk: ^3.5.0-0
resolution: workspace
''');
p.file('pkgs/a/bin/a.dart', '''
main() => print('a:a');
''');
p.file('pkgs/a/bin/tool.dart', '''
main() => print('a:tool');
''');
p.file('pkgs/b/bin/b.dart', '''
main() => print('b:b');
''');
expect(
await p
.run(['run', 'a'], workingDir: path.join(p.dirPath, 'pkgs', 'a')),
isA<ProcessResult>()
.having((r) => r.exitCode, 'exitCode', 0)
.having((r) => r.stdout, 'stdout', 'a:a\n'));
expect(
await p
.run(['run', 'a:a'], workingDir: path.join(p.dirPath, 'pkgs', 'a')),
isA<ProcessResult>()
.having((r) => r.exitCode, 'exitCode', 0)
.having((r) => r.stdout, 'stdout', 'a:a\n'));
expect(
await p.run(['run', ':tool'],
workingDir: path.join(p.dirPath, 'pkgs', 'a')),
isA<ProcessResult>()
.having((r) => r.exitCode, 'exitCode', 0)
.having((r) => r.stdout, 'stdout', 'a:tool\n'));
expect(
await p
.run(['run', 'b'], workingDir: path.join(p.dirPath, 'pkgs', 'a')),
isA<ProcessResult>()
.having((r) => r.exitCode, 'exitCode', 0)
.having((r) => r.stdout, 'stdout', 'b:b\n'));
});
group('DDS', () {
group('disable', () {
test('dart run simple', () async {

View file

@ -264,4 +264,44 @@ void main() {
});
}
});
test('workspace', () async {
final p = project(
sdkConstraint: VersionConstraint.parse('^3.5.0-0'),
pubspecExtras: {
'workspace': ['pkgs/a', 'pkgs/b']
});
p.file('pkgs/a/pubspec.yaml', '''
name: a
environment:
sdk: ^3.5.0-0
resolution: workspace
dependencies:
b:
test: any
''');
p.file('pkgs/b/pubspec.yaml', '''
name: b
environment:
sdk: ^3.5.0-0
resolution: workspace
''');
p.file('pkgs/a/test/a_test.dart', '''
import 'package:test/test.dart';
main() {
test('works', () {
print('testing package a');
});
}
''');
p.file('pkgs/b/test/b_test.dart', '''
main() => throw('Test failure');
''');
expect(
await p.run(['test'], workingDir: path.join(p.dirPath, 'pkgs', 'a')),
isA<ProcessResult>()
.having((r) => r.stdout, 'stdout', contains('testing package a\n'))
.having((r) => r.stderr, 'stderr', isEmpty)
.having((r) => r.exitCode, 'exitCode', 0));
});
}