Skip to content

Commit 72f462e

Browse files
author
Dart CI
committed
Version 2.15.0-49.0.dev
Merge commit 'b54269e2551608a388f11eb6ccd21a7c41d9b529' into 'dev'
2 parents de7bac3 + b54269e commit 72f462e

25 files changed

+117
-209
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ vars = {
140140
"pool_rev": "7abe634002a1ba8a0928eded086062f1307ccfae",
141141
"process_rev": "56ece43b53b64c63ae51ec184b76bd5360c28d0b",
142142
"protobuf_rev": "c1eb6cb51af39ccbaa1a8e19349546586a5c8e31",
143-
"pub_rev": "9f2ddc02f066c68fb638ff65fbb73761ece23267",
143+
"pub_rev": "cd7a43f2109f7e5eb22e73c7f4e15d25fd57598e",
144144
"pub_semver_rev": "f50d80ef10c4b2fa5f4c8878036a4d9342c0cc82",
145145
"resource_rev": "6b79867d0becf5395e5819a75720963b8298e9a7",
146146
"root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",

codereview.settings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ GERRIT_HOST: True
33
CODE_REVIEW_SERVER: https://dart-review.googlesource.com
44
VIEW_VC: https://dart.googlesource.com/sdk/+
55
6+
USE_PYTHON3: True

pkg/dartdev/lib/dartdev.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import 'package:devtools_server/devtools_server.dart';
1515
import 'package:meta/meta.dart';
1616
import 'package:pedantic/pedantic.dart';
1717
import 'package:pub/pub.dart';
18+
1819
import 'package:usage/usage.dart';
1920

2021
import 'src/analytics.dart';
@@ -36,6 +37,15 @@ import 'src/vm_interop_handler.dart';
3637
/// analytics logic, it has been moved here.
3738
Future<void> runDartdev(List<String> args, SendPort port) async {
3839
VmInteropHandler.initialize(port);
40+
41+
// TODO(sigurdm): Remove when top-level pub is removed.
42+
if (args[0] == '__deprecated_pub') {
43+
// This is the entry-point supporting the top-level `pub` script.
44+
// ignore: deprecated_member_use
45+
VmInteropHandler.exit(await deprecatedpubCommand().run(args.skip(1)));
46+
return;
47+
}
48+
3949
if (args.contains('run')) {
4050
// These flags have a format that can't be handled by package:args, so while
4151
// they are valid flags we'll assume the VM has verified them by this point.

pkg/dartdev/lib/src/commands/create.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,11 @@ class CreateCommand extends DartdevCommand {
102102
);
103103

104104
if (argResults['pub']) {
105-
if (!Sdk.checkArtifactExists(sdk.pubSnapshot)) {
106-
return 255;
107-
}
108105
log.stdout('');
109106
var progress = log.progress('Running pub get');
110107
var process = await startDartProcess(
111108
sdk,
112-
[sdk.pubSnapshot, 'get', '--no-precompile'],
109+
['pub', 'get'],
113110
cwd: dir,
114111
);
115112

pkg/dartdev/lib/src/sdk.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,6 @@ class Sdk {
7878
'devtools',
7979
);
8080

81-
String get pubSnapshot => path.absolute(
82-
sdkPath,
83-
'bin',
84-
'snapshots',
85-
'pub.dart.snapshot',
86-
);
87-
8881
static bool checkArtifactExists(String path) {
8982
if (!File(path).existsSync()) {
9083
log.stderr('Could not find $path. Have you built the full '

pkg/dartdev/test/analytics_test.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ Future<void> main() async {
9999
});
100100
test('create', () {
101101
final p = project(logAnalytics: true);
102-
final result = p.runSync(['create', '-tpackage-simple', 'name']);
102+
final result =
103+
p.runSync(['create', '--no-pub', '-tpackage-simple', 'name']);
103104
expect(extractAnalytics(result), [
104105
{
105106
'hitType': 'screenView',
@@ -113,7 +114,7 @@ Future<void> main() async {
113114
'label': null,
114115
'value': null,
115116
'cd1': '0',
116-
'cd3': ' template ',
117+
'cd3': ' pub template ',
117118
}
118119
},
119120
{

pkg/dartdev/test/sdk_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ void _sdk() {
2525
expectFileExists(Sdk().analysisServerSnapshot);
2626
});
2727

28-
test('pub snapshot', () {
29-
expectFileExists(Sdk().pubSnapshot);
30-
});
31-
3228
test('dds snapshot', () {
3329
expectFileExists(Sdk().ddsSnapshot);
3430
});

pkg/front_end/test/spell_checking_list_code.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ rpc
10791079
rs
10801080
runnable
10811081
s
1082-
sand
1082+
sandboxed
10831083
sanitizing
10841084
saw
10851085
say

pkg/front_end/test/spell_checking_list_tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ row
820820
rows
821821
runtimes
822822
rv
823-
sand
823+
sandboxed
824824
saves
825825
scans
826826
scheduler

pkg/front_end/tool/ast_model.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,24 @@ class AstModel {
505505
///
506506
/// If [printDump] is `true`, a dump of the model printed to stdout.
507507
Future<AstModel> deriveAstModel(Uri repoDir, {bool printDump: false}) async {
508+
bool errorsFound = false;
508509
CompilerOptions options = new CompilerOptions();
509510
options.sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
510511
options.packagesFileUri = computePackageConfig(repoDir);
511512
options.onDiagnostic = (DiagnosticMessage message) {
512513
printDiagnosticMessage(message, print);
514+
if (message.severity == Severity.error) {
515+
errorsFound = true;
516+
}
513517
};
514518

515519
InternalCompilerResult compilerResult = (await kernelForProgramInternal(
516520
astLibraryUri, options,
517521
retainDataForTesting: true,
518522
requireMain: false)) as InternalCompilerResult;
523+
if (errorsFound) {
524+
throw 'Errors found';
525+
}
519526
ClassHierarchy classHierarchy = compilerResult.classHierarchy!;
520527
CoreTypes coreTypes = compilerResult.coreTypes!;
521528
TypeEnvironment typeEnvironment =
@@ -524,7 +531,6 @@ Future<AstModel> deriveAstModel(Uri repoDir, {bool printDump: false}) async {
524531
Library astLibrary = compilerResult.component!.libraries
525532
.singleWhere((library) => library.importUri == astLibraryUri);
526533

527-
bool errorsFound = false;
528534
void reportError(String message) {
529535
print(message);
530536
errorsFound = true;

0 commit comments

Comments
 (0)