Building (#3017)
* Change terminology for precompilation to building
Co-authored-by: Michael Thomsen <mit@google.com>
diff --git a/lib/src/command/add.dart b/lib/src/command/add.dart
index d1b16c1..36b1eca 100644
--- a/lib/src/command/add.dart
+++ b/lib/src/command/add.dart
@@ -77,7 +77,7 @@
help: "Report what dependencies would change but don't change any.");
argParser.addFlag('precompile',
- help: 'Precompile executables in immediate dependencies.');
+ help: 'Build executables in immediate dependencies.');
argParser.addOption('directory',
abbr: 'C', help: 'Run this in the directory<dir>.', valueHelp: 'dir');
}
diff --git a/lib/src/command/get.dart b/lib/src/command/get.dart
index de82e40..7412769 100644
--- a/lib/src/command/get.dart
+++ b/lib/src/command/get.dart
@@ -31,7 +31,7 @@
help: "Report what dependencies would change but don't change any.");
argParser.addFlag('precompile',
- help: 'Precompile executables in immediate dependencies.');
+ help: 'Build executables in immediate dependencies.');
argParser.addFlag('packages-dir', hide: true);
diff --git a/lib/src/dart.dart b/lib/src/dart.dart
index 7b1f55a..f72e666 100644
--- a/lib/src/dart.dart
+++ b/lib/src/dart.dart
@@ -9,14 +9,14 @@
import 'dart:io';
import 'package:analyzer/dart/analysis/analysis_context.dart';
-import 'package:analyzer/dart/analysis/results.dart';
-import 'package:analyzer/file_system/overlay_file_system.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:analyzer/dart/analysis/context_builder.dart';
import 'package:analyzer/dart/analysis/context_locator.dart';
+import 'package:analyzer/dart/analysis/results.dart';
import 'package:analyzer/dart/analysis/session.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/error/error.dart';
+import 'package:analyzer/file_system/overlay_file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
import 'package:cli_util/cli_util.dart';
import 'package:frontend_server_client/frontend_server_client.dart';
import 'package:meta/meta.dart';
@@ -183,14 +183,14 @@
final highlightedName = log.bold(name);
if (result?.errorCount == 0) {
- log.message('Precompiled $highlightedName.');
+ log.message('Built $highlightedName.');
await File(incrementalDillOutputPath).copy(outputPath);
} else {
// Don't leave partial results.
deleteEntry(outputPath);
throw ApplicationException(
- log.yellow('Failed to precompile $highlightedName:\n') +
+ log.yellow('Failed to build $highlightedName:\n') +
(result?.compilerOutputLines?.join('\n') ?? ''));
}
} finally {
diff --git a/lib/src/entrypoint.dart b/lib/src/entrypoint.dart
index c1d34e6..23d7e62 100644
--- a/lib/src/entrypoint.dart
+++ b/lib/src/entrypoint.dart
@@ -300,7 +300,7 @@
///
/// Except globally activated packages they should precompile executables from
/// the package itself if they are immutable.
- List<Executable> get precompiledExecutables {
+ List<Executable> get builtExecutables {
if (isGlobal) {
if (isCached) {
return root.executablePaths
@@ -321,15 +321,15 @@
return r;
}
- /// Precompiles all [precompiledExecutables].
+ /// Precompiles all [builtExecutables].
Future<void> precompileExecutables({Iterable<String> changed}) async {
migrateCache();
- final executables = precompiledExecutables;
+ final executables = builtExecutables;
if (executables.isEmpty) return;
- await log.progress('Precompiling executables', () async {
+ await log.progress('Building package executables', () async {
if (isGlobal) {
/// Global snapshots might linger in the cache if we don't remove old
/// snapshots when it is re-activated.
@@ -347,7 +347,7 @@
/// Precompiles executable .dart file at [path] to a snapshot.
Future<void> precompileExecutable(Executable executable) async {
- return await log.progress('Precompiling executable', () async {
+ return await log.progress('Building package executable', () async {
ensureDir(p.dirname(pathOfExecutable(executable)));
return waitAndPrintErrors([_precompileExecutable(executable)]);
});
diff --git a/lib/src/executable.dart b/lib/src/executable.dart
index 5bd12b6..7938235 100644
--- a/lib/src/executable.dart
+++ b/lib/src/executable.dart
@@ -46,7 +46,7 @@
/// If [enableAsserts] is true, the program is run with assertions enabled.
///
/// If the executable is in an immutable package and we pass no [vmArgs], it
-/// run from snapshot (and precompiled if the snapshot doesn't already exist).
+/// run from snapshot (and built if the snapshot doesn't already exist).
///
/// Returns the exit code of the spawned app.
Future<int> runExecutable(
@@ -136,7 +136,7 @@
rethrow;
}
- log.fine('Precompiled executable is out of date.');
+ log.fine('Built executable is out of date.');
await recompile(executable);
return await _runDartProgram(
executablePath,
@@ -259,7 +259,7 @@
/// the package is an immutable (non-path) dependency of [root].
///
/// If returning the path to a snapshot that doesn't already exist, the script
-/// Will be precompiled. And a message will be printed only if a terminal is
+/// Will be built. And a message will be printed only if a terminal is
/// attached to stdout.
///
/// Throws an [CommandResolutionFailedException] if the command is not found or
diff --git a/lib/src/global_packages.dart b/lib/src/global_packages.dart
index a5a5e5b..5c2282a 100644
--- a/lib/src/global_packages.dart
+++ b/lib/src/global_packages.dart
@@ -22,8 +22,8 @@
import 'package_name.dart';
import 'pubspec.dart';
import 'sdk.dart';
-import 'solver.dart';
import 'solver/incompatibility_cause.dart';
+import 'solver.dart';
import 'source/cached.dart';
import 'source/git.dart';
import 'source/hosted.dart';
@@ -396,7 +396,7 @@
/// Runs [package]'s [executable] with [args].
///
- /// If [executable] is available in its precompiled form, that will be
+ /// If [executable] is available in its built form, that will be
/// recompiled if the SDK has been upgraded since it was first compiled and
/// then run. Otherwise, it will be run from source.
///
@@ -740,7 +740,7 @@
}
}
- // If the script was precompiled to a snapshot, just try to invoke that
+ // If the script was built to a snapshot, just try to invoke that
// directly and skip pub global run entirely.
String invocation;
if (Platform.isWindows) {
diff --git a/test/cache/repair/recompiles_snapshots_test.dart b/test/cache/repair/recompiles_snapshots_test.dart
index def9665..698e148 100644
--- a/test/cache/repair/recompiles_snapshots_test.dart
+++ b/test/cache/repair/recompiles_snapshots_test.dart
@@ -27,8 +27,8 @@
Downloading foo 1.0.0...
Reinstalled 1 package.
Reactivating foo 1.0.0...
- Precompiling executables...
- Precompiled foo:script.
+ Building package executables...
+ Built foo:script.
Reactivated 1 package.''');
var pub = await pubRun(global: true, args: ['foo:script']);
diff --git a/test/cache/repair/updates_binstubs_test.dart b/test/cache/repair/updates_binstubs_test.dart
index d55e361..bfb6400 100644
--- a/test/cache/repair/updates_binstubs_test.dart
+++ b/test/cache/repair/updates_binstubs_test.dart
@@ -41,8 +41,8 @@
Downloading foo 1.0.0...
Reinstalled 1 package.
Reactivating foo 1.0.0...
- Precompiling executables...
- Precompiled foo:script.
+ Building package executables...
+ Built foo:script.
Installed executable foo-script.
Reactivated 1 package.''');
diff --git a/test/embedding/goldens/helptext.txt b/test/embedding/goldens/helptext.txt
index c06b931..0026418 100644
--- a/test/embedding/goldens/helptext.txt
+++ b/test/embedding/goldens/helptext.txt
@@ -88,7 +88,7 @@
--[no-]offline Use cached packages instead of accessing the network.
-n, --dry-run Report what dependencies would change but don't change
any.
- --[no-]precompile Precompile executables in immediate dependencies.
+ --[no-]precompile Build executables in immediate dependencies.
-C, --directory=<dir> Run this in the directory<dir>.
Run "pub_command_runner help" to see global options.
diff --git a/test/global/activate/activate_git_after_hosted_test.dart b/test/global/activate/activate_git_after_hosted_test.dart
index 88ea6c6..5dd32c1 100644
--- a/test/global/activate/activate_git_after_hosted_test.dart
+++ b/test/global/activate/activate_git_after_hosted_test.dart
@@ -33,8 +33,8 @@
'Resolving dependencies...\n'
'+ foo 1.0.0 from git ../foo.git at '),
// Specific revision number goes here.
- endsWith('Precompiling executables...\n'
- 'Precompiled foo:foo.\n'
+ endsWith('Building package executables...\n'
+ 'Built foo:foo.\n'
'Activated foo 1.0.0 from Git repository "../foo.git".')));
// Should now run the git one.
diff --git a/test/global/activate/activate_hosted_after_git_test.dart b/test/global/activate/activate_hosted_after_git_test.dart
index abeecdc..a86b2cc 100644
--- a/test/global/activate/activate_hosted_after_git_test.dart
+++ b/test/global/activate/activate_hosted_after_git_test.dart
@@ -29,8 +29,8 @@
Resolving dependencies...
+ foo 2.0.0
Downloading foo 2.0.0...
- Precompiling executables...
- Precompiled foo:foo.
+ Building package executables...
+ Built foo:foo.
Activated foo 2.0.0.''');
// Should now run the hosted one.
diff --git a/test/global/activate/activate_hosted_after_path_test.dart b/test/global/activate/activate_hosted_after_path_test.dart
index 66ce803..1e01735 100644
--- a/test/global/activate/activate_hosted_after_path_test.dart
+++ b/test/global/activate/activate_hosted_after_path_test.dart
@@ -4,10 +4,9 @@
// @dart=2.10
-import 'package:test/test.dart';
-
import 'package:path/path.dart' as p;
import 'package:pub/src/io.dart';
+import 'package:test/test.dart';
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
@@ -33,8 +32,8 @@
Resolving dependencies...
+ foo 2.0.0
Downloading foo 2.0.0...
- Precompiling executables...
- Precompiled foo:foo.
+ Building package executables...
+ Built foo:foo.
Activated foo 2.0.0.''');
// Should now run the hosted one.
diff --git a/test/global/activate/activate_hosted_twice_test.dart b/test/global/activate/activate_hosted_twice_test.dart
index 97518d0..925a205 100644
--- a/test/global/activate/activate_hosted_twice_test.dart
+++ b/test/global/activate/activate_hosted_twice_test.dart
@@ -31,8 +31,8 @@
+ foo 1.0.0
Downloading foo 1.0.0...
Downloading bar 1.0.0...
-Precompiling executables...
-Precompiled foo:foo.
+Building package executables...
+Built foo:foo.
Activated foo 1.0.0.''');
await runPub(args: ['global', 'activate', 'foo'], output: '''
@@ -59,8 +59,8 @@
+ bar 2.0.0
+ foo 1.0.0
Downloading bar 2.0.0...
-Precompiling executables...
-Precompiled foo:foo.
+Building package executables...
+Built foo:foo.
Activated foo 1.0.0.''');
var pub2 = await pubRun(global: true, args: ['foo']);
diff --git a/test/global/activate/cached_package_test.dart b/test/global/activate/cached_package_test.dart
index 67a1765..7ddcf10 100644
--- a/test/global/activate/cached_package_test.dart
+++ b/test/global/activate/cached_package_test.dart
@@ -22,8 +22,8 @@
await runPub(args: ['global', 'activate', 'foo'], output: '''
Resolving dependencies...
+ foo 1.0.0
- Precompiling executables...
- Precompiled foo:foo.
+ Building package executables...
+ Built foo:foo.
Activated foo 1.0.0.''');
// Should be in global package cache.
diff --git a/test/global/activate/different_version_test.dart b/test/global/activate/different_version_test.dart
index 0df40eb..61ba228 100644
--- a/test/global/activate/different_version_test.dart
+++ b/test/global/activate/different_version_test.dart
@@ -31,8 +31,8 @@
Resolving dependencies...
+ foo 2.0.0
Downloading foo 2.0.0...
- Precompiling executables...
- Precompiled foo:foo.
+ Building package executables...
+ Built foo:foo.
Activated foo 2.0.0.''');
});
}
diff --git a/test/global/activate/doesnt_snapshot_path_executables_test.dart b/test/global/activate/doesnt_snapshot_path_executables_test.dart
index 0a38e7c..b809ea7 100644
--- a/test/global/activate/doesnt_snapshot_path_executables_test.dart
+++ b/test/global/activate/doesnt_snapshot_path_executables_test.dart
@@ -18,7 +18,7 @@
await runPub(
args: ['global', 'activate', '-spath', '../foo'],
- output: isNot(contains('Precompiled foo:hello.')));
+ output: isNot(contains('Built foo:hello.')));
await d.dir(cachePath, [
d.dir('global_packages', [
diff --git a/test/global/activate/git_package_test.dart b/test/global/activate/git_package_test.dart
index cb31296..43cd218 100644
--- a/test/global/activate/git_package_test.dart
+++ b/test/global/activate/git_package_test.dart
@@ -24,8 +24,8 @@
startsWith('Resolving dependencies...\n'
'+ foo 1.0.0 from git ../foo.git at '),
// Specific revision number goes here.
- endsWith('Precompiling executables...\n'
- 'Precompiled foo:foo.\n'
+ endsWith('Building package executables...\n'
+ 'Built foo:foo.\n'
'Activated foo 1.0.0 from Git repository "../foo.git".')));
});
}
diff --git a/test/global/activate/ignores_active_version_test.dart b/test/global/activate/ignores_active_version_test.dart
index aa022f8..d405f54 100644
--- a/test/global/activate/ignores_active_version_test.dart
+++ b/test/global/activate/ignores_active_version_test.dart
@@ -30,8 +30,8 @@
Resolving dependencies...
+ foo 1.3.0
Downloading foo 1.3.0...
- Precompiling executables...
- Precompiled foo:foo.
+ Building package executables...
+ Built foo:foo.
Activated foo 1.3.0.''');
});
}
diff --git a/test/global/activate/path_package_test.dart b/test/global/activate/path_package_test.dart
index 01607e9..476321a 100644
--- a/test/global/activate/path_package_test.dart
+++ b/test/global/activate/path_package_test.dart
@@ -5,9 +5,8 @@
// @dart=2.10
import 'package:path/path.dart' as p;
-import 'package:test/test.dart';
-
import 'package:pub/src/io.dart';
+import 'package:test/test.dart';
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
@@ -77,7 +76,7 @@
args: ['global', 'activate', '--source', 'path', '../foo'],
output: allOf([
contains('Activated foo 1.0.0 at path'),
- isNot(contains('Precompiled'))
+ isNot(contains('Built'))
]));
});
}
diff --git a/test/global/activate/reactivating_git_upgrades_test.dart b/test/global/activate/reactivating_git_upgrades_test.dart
index 81c1e66..0ccbb65 100644
--- a/test/global/activate/reactivating_git_upgrades_test.dart
+++ b/test/global/activate/reactivating_git_upgrades_test.dart
@@ -24,8 +24,8 @@
startsWith('Resolving dependencies...\n'
'+ foo 1.0.0 from git ../foo.git at '),
// Specific revision number goes here.
- endsWith('Precompiling executables...\n'
- 'Precompiled foo:foo.\n'
+ endsWith('Building package executables...\n'
+ 'Built foo:foo.\n'
'Activated foo 1.0.0 from Git repository "../foo.git".')));
await d.git('foo.git', [d.libPubspec('foo', '1.0.1')]).commit();
@@ -39,8 +39,8 @@
'Resolving dependencies...\n'
'+ foo 1.0.1 from git ../foo.git at '),
// Specific revision number goes here.
- endsWith('Precompiling executables...\n'
- 'Precompiled foo:foo.\n'
+ endsWith('Building package executables...\n'
+ 'Built foo:foo.\n'
'Activated foo 1.0.1 from Git repository "../foo.git".')));
});
}
diff --git a/test/global/activate/snapshots_git_executables_test.dart b/test/global/activate/snapshots_git_executables_test.dart
index 91da598..81a0152 100644
--- a/test/global/activate/snapshots_git_executables_test.dart
+++ b/test/global/activate/snapshots_git_executables_test.dart
@@ -25,10 +25,8 @@
await runPub(
args: ['global', 'activate', '-sgit', '../foo.git'],
- output: allOf([
- contains('Precompiled foo:hello.'),
- contains('Precompiled foo:goodbye.')
- ]));
+ output: allOf(
+ [contains('Built foo:hello.'), contains('Built foo:goodbye.')]));
await d.dir(cachePath, [
d.dir('global_packages', [
diff --git a/test/global/activate/snapshots_hosted_executables_test.dart b/test/global/activate/snapshots_hosted_executables_test.dart
index d338ad7..e9d2a2d 100644
--- a/test/global/activate/snapshots_hosted_executables_test.dart
+++ b/test/global/activate/snapshots_hosted_executables_test.dart
@@ -24,10 +24,8 @@
await runPub(
args: ['global', 'activate', 'foo'],
- output: allOf([
- contains('Precompiled foo:hello.'),
- contains('Precompiled foo:goodbye.')
- ]));
+ output: allOf(
+ [contains('Built foo:hello.'), contains('Built foo:goodbye.')]));
await d.dir(cachePath, [
d.dir('global_packages', [
diff --git a/test/global/activate/uncached_package_test.dart b/test/global/activate/uncached_package_test.dart
index 8eef253..3bdb185 100644
--- a/test/global/activate/uncached_package_test.dart
+++ b/test/global/activate/uncached_package_test.dart
@@ -27,8 +27,8 @@
Resolving dependencies...
+ foo 1.2.3
Downloading foo 1.2.3...
- Precompiling executables...
- Precompiled foo:foo.
+ Building package executables...
+ Built foo:foo.
Activated foo 1.2.3.''');
// Should be in global package cache.
diff --git a/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart b/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
index 2350b10..f59d8e2 100644
--- a/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
+++ b/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
@@ -10,7 +10,7 @@
import '../../test_pub.dart';
void main() {
- test('the binstubs runs a precompiled snapshot if present', () async {
+ test('the binstubs runs a built snapshot if present', () async {
await servePackages((builder) {
builder.serve('foo', '1.0.0', pubspec: {
'executables': {'foo-script': 'script'}
diff --git a/test/global/binstubs/outdated_snapshot_test.dart b/test/global/binstubs/outdated_snapshot_test.dart
index 3b87c6a..c1181b9 100644
--- a/test/global/binstubs/outdated_snapshot_test.dart
+++ b/test/global/binstubs/outdated_snapshot_test.dart
@@ -5,11 +5,10 @@
// @dart=2.10
import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
import 'package:test/test.dart';
import 'package:test_process/test_process.dart';
-import 'package:pub/src/io.dart';
-
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
import 'utils.dart';
@@ -44,7 +43,7 @@
['arg1', 'arg2'],
environment: getEnvironment());
- // We don't get `Precompiling executable...` because we are running through
+ // We don't get `Building package executable...` because we are running through
// the binstub.
expect(process.stdout, emitsThrough('ok [arg1, arg2]'));
await process.shouldExit();
diff --git a/test/global/deactivate/removes_precompiled_snapshots_test.dart b/test/global/deactivate/removes_precompiled_snapshots_test.dart
index 6f26a74..7d075b3 100644
--- a/test/global/deactivate/removes_precompiled_snapshots_test.dart
+++ b/test/global/deactivate/removes_precompiled_snapshots_test.dart
@@ -10,7 +10,7 @@
import '../../test_pub.dart';
void main() {
- test('removes precompiled snapshots', () async {
+ test('removes built snapshots', () async {
await servePackages((builder) => builder.serve('foo', '1.0.0'));
await runPub(args: ['global', 'activate', 'foo']);
diff --git a/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart b/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
index 98b2632..4ace362 100644
--- a/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
+++ b/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
@@ -36,7 +36,7 @@
var pub = await pubRun(global: true, args: ['foo:script']);
// In the real world this would just print "hello!", but since we collect
// all output we see the precompilation messages as well.
- expect(pub.stdout, emits('Precompiling executable...'));
+ expect(pub.stdout, emits('Building package executable...'));
expect(pub.stdout, emitsThrough('ok'));
await pub.shouldExit();
diff --git a/test/goldens/help.txt b/test/goldens/help.txt
index 2fdf107..10997b4 100644
--- a/test/goldens/help.txt
+++ b/test/goldens/help.txt
@@ -15,7 +15,7 @@
--[no-]offline Use cached packages instead of accessing the network.
-n, --dry-run Report what dependencies would change but don't change
any.
- --[no-]precompile Precompile executables in immediate dependencies.
+ --[no-]precompile Build executables in immediate dependencies.
Run "pub help" to see global options.
See https://dart.dev/tools/pub/cmd/pub-add for detailed documentation.
@@ -174,7 +174,7 @@
--[no-]offline Use cached packages instead of accessing the network.
-n, --dry-run Report what dependencies would change but don't change
any.
- --[no-]precompile Precompile executables in immediate dependencies.
+ --[no-]precompile Build executables in immediate dependencies.
Run "pub help" to see global options.
See https://dart.dev/tools/pub/cmd/pub-get for detailed documentation.
@@ -259,7 +259,7 @@
--[no-]offline Use cached packages instead of accessing the network.
-n, --dry-run Report what dependencies would change but don't change
any.
- --[no-]precompile Precompile executables in immediate dependencies.
+ --[no-]precompile Build executables in immediate dependencies.
Run "pub help" to see global options.
See https://dart.dev/tools/pub/cmd/pub-remove for detailed documentation.
@@ -314,7 +314,7 @@
--[no-]offline Use cached packages instead of accessing the network.
-n, --dry-run Report what dependencies would change but don't change
any.
- --[no-]precompile Precompile executables in immediate dependencies.
+ --[no-]precompile Build executables in immediate dependencies.
--null-safety Upgrade constraints in pubspec.yaml to null-safety
versions
diff --git a/test/run/dartdev/package_api_test.dart b/test/run/dartdev/package_api_test.dart
index 2f505c6..65cc17e 100644
--- a/test/run/dartdev/package_api_test.dart
+++ b/test/run/dartdev/package_api_test.dart
@@ -65,8 +65,8 @@
var pub = await pubRunFromDartDev(args: ['foo:script']);
- expect(pub.stdout, emits('Precompiling executable...'));
- expect(pub.stdout, emits('Precompiled foo:script.'));
+ expect(pub.stdout, emits('Building package executable...'));
+ expect(pub.stdout, emits('Built foo:script.'));
expect(pub.stdout, emits('null'));
expect(
pub.stdout,
diff --git a/test/run/package_api_test.dart b/test/run/package_api_test.dart
index 1b71c42..12929ab 100644
--- a/test/run/package_api_test.dart
+++ b/test/run/package_api_test.dart
@@ -65,8 +65,8 @@
var pub = await pubRun(args: ['foo:script']);
- expect(pub.stdout, emits('Precompiling executable...'));
- expect(pub.stdout, emits('Precompiled foo:script.'));
+ expect(pub.stdout, emits('Building package executable...'));
+ expect(pub.stdout, emits('Built foo:script.'));
expect(pub.stdout, emits('null'));
expect(
pub.stdout,
diff --git a/test/run/precompile_test.dart b/test/run/precompile_test.dart
index b067cc2..ac663d5 100644
--- a/test/run/precompile_test.dart
+++ b/test/run/precompile_test.dart
@@ -37,7 +37,7 @@
var pub = await pubRun(args: ['test']);
await pub.shouldExit(0);
final lines = await pub.stdout.rest.toList();
- expect(lines, contains('Precompiling executable...'));
+ expect(lines, contains('Building package executable...'));
expect(lines, contains('hello'));
});
@@ -49,7 +49,7 @@
var pub = await pubRun(args: ['test'], verbose: false);
await pub.shouldExit(0);
final lines = await pub.stdout.rest.toList();
- expect(lines, isNot(contains('Precompiling executable...')));
+ expect(lines, isNot(contains('Building package executable...')));
expect(lines, contains('hello'));
});
@@ -73,7 +73,7 @@
);
await pub.shouldExit(0);
final lines = await pub.stdout.rest.toList();
- expect(lines, contains('Precompiling executable...'));
+ expect(lines, contains('Building package executable...'));
expect(lines, contains('running with PUB_CACHE: ".pub_cache"'));
});
@@ -89,14 +89,14 @@
await pubGet(
args: ['--precompile'],
- output: contains('Precompiling executables...'));
+ output: contains('Building package executables...'));
var pub = await pubRun(
args: ['test'],
);
await pub.shouldExit(0);
final lines = await pub.stdout.rest.toList();
- expect(lines, isNot(contains('Precompiling executable...')));
+ expect(lines, isNot(contains('Building package executable...')));
});
// Regression test of https://github.com/dart-lang/pub/issues/2483
@@ -114,7 +114,7 @@
await pubGet(
args: ['--precompile'],
environment: {'PUB_CACHE': '.pub_cache'},
- output: contains('Precompiling executables...'));
+ output: contains('Building package executables...'));
var pub = await pubRun(
args: ['test'],
@@ -122,7 +122,7 @@
);
await pub.shouldExit(0);
final lines = await pub.stdout.rest.toList();
- expect(lines, isNot(contains('Precompiling executable...')));
+ expect(lines, isNot(contains('Building package executable...')));
expect(lines, contains('running with PUB_CACHE: ".pub_cache"'));
});
}
diff --git a/test/snapshot_test.dart b/test/snapshot_test.dart
index 1f131b2..6ad44f6 100644
--- a/test/snapshot_test.dart
+++ b/test/snapshot_test.dart
@@ -29,10 +29,8 @@
await pubGet(
args: ['--precompile'],
- output: allOf([
- contains('Precompiled foo:hello.'),
- contains('Precompiled foo:goodbye.')
- ]));
+ output: allOf(
+ [contains('Built foo:hello.'), contains('Built foo:goodbye.')]));
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
d.dir('foo', [
@@ -70,10 +68,8 @@
await pubGet(
args: ['--precompile'],
- output: allOf([
- contains('Precompiled foo:hello.'),
- contains('Precompiled foo:goodbye.')
- ]));
+ output: allOf(
+ [contains('Built foo:hello.'), contains('Built foo:goodbye.')]));
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
d.dir('foo', [
@@ -105,7 +101,7 @@
await d.appDir({'foo': 'any'}).create();
await pubGet(
- args: ['--precompile'], output: contains('Precompiled foo:hello.'));
+ args: ['--precompile'], output: contains('Built foo:hello.'));
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
d.file('hello.dart-$versionSuffix.snapshot', contains('hello!'))
@@ -119,7 +115,7 @@
});
await pubUpgrade(
- args: ['--precompile'], output: contains('Precompiled foo:hello.'));
+ args: ['--precompile'], output: contains('Built foo:hello.'));
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
d.file('hello.dart-$versionSuffix.snapshot', contains('hello 2!'))
@@ -151,7 +147,7 @@
await d.appDir({'foo': 'any'}).create();
await pubGet(
- args: ['--precompile'], output: contains('Precompiled foo:hello.'));
+ args: ['--precompile'], output: contains('Built foo:hello.'));
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
d.file('hello.dart-$versionSuffix.snapshot', contains('hello!'))
@@ -164,7 +160,7 @@
});
await pubUpgrade(
- args: ['--precompile'], output: contains('Precompiled foo:hello.'));
+ args: ['--precompile'], output: contains('Built foo:hello.'));
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
d.file('hello.dart-$versionSuffix.snapshot', contains('hello 2!'))
@@ -189,7 +185,7 @@
}).create();
await pubGet(
- args: ['--precompile'], output: contains('Precompiled foo:hello.'));
+ args: ['--precompile'], output: contains('Built foo:hello.'));
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
d.file('hello.dart-$versionSuffix.snapshot', contains('Hello!'))
@@ -201,7 +197,7 @@
]).commit();
await pubUpgrade(
- args: ['--precompile'], output: contains('Precompiled foo:hello.'));
+ args: ['--precompile'], output: contains('Built foo:hello.'));
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
d.file('hello.dart-$versionSuffix.snapshot', contains('Goodbye!'))
@@ -233,7 +229,7 @@
// In the real world this would just print "hello!", but since we collect
// all output we see the precompilation messages as well.
- expect(process.stdout, emits('Precompiling executable...'));
+ expect(process.stdout, emits('Building package executable...'));
expect(process.stdout, emitsThrough('hello!'));
await process.shouldExit();
diff --git a/test/test_pub.dart b/test/test_pub.dart
index ceae99d..c89f865 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -18,11 +18,6 @@
import 'package:async/async.dart';
import 'package:http/testing.dart';
import 'package:path/path.dart' as p;
-import 'package:pub_semver/pub_semver.dart';
-import 'package:test/test.dart' hide fail;
-import 'package:test/test.dart' as test show fail;
-import 'package:test_process/test_process.dart';
-
import 'package:pub/src/entrypoint.dart';
import 'package:pub/src/exit_codes.dart' as exit_codes;
// TODO(rnystrom): Using "gitlib" as the prefix here is ugly, but "git" collides
@@ -38,6 +33,10 @@
import 'package:pub/src/system_cache.dart';
import 'package:pub/src/utils.dart';
import 'package:pub/src/validator.dart';
+import 'package:pub_semver/pub_semver.dart';
+import 'package:test/test.dart' hide fail;
+import 'package:test/test.dart' as test show fail;
+import 'package:test_process/test_process.dart';
import 'descriptor.dart' as d;
import 'descriptor_server.dart';
@@ -78,7 +77,7 @@
.firstWhere((e) => e['name'] == packageName,
orElse: () => null) as Map<String, dynamic>;
-/// The suffix appended to a precompiled snapshot.
+/// The suffix appended to a built snapshot.
final versionSuffix = testVersion ?? sdk.version;
/// Enum identifying a pub command that can be run with a well-defined success