From 0baa3c1e625cd178ae35ec4d3bbb75828e4aaf82 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Wed, 11 May 2022 08:50:45 +0000 Subject: [PATCH] Discontinue .packages file Contributes to https://github.com/dart-lang/sdk/issues/48275 Change-Id: I3acb90b91b9b206b69ca0ae311aa43f5954c29a6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243625 Reviewed-by: Nate Bosch Reviewed-by: Sigmund Cherem Commit-Queue: Michael Thomsen --- pkg/test_runner/lib/src/configuration.dart | 2 +- tools/generate_package_config.dart | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/pkg/test_runner/lib/src/configuration.dart b/pkg/test_runner/lib/src/configuration.dart index 92cf4a9dbb5..e6a090187d2 100644 --- a/pkg/test_runner/lib/src/configuration.dart +++ b/pkg/test_runner/lib/src/configuration.dart @@ -171,7 +171,7 @@ class TestConfiguration { String _packages; String get packages { - // If the .packages file path wasn't given, find it. + // If the package config file path wasn't given, find it. _packages ??= Repository.uri.resolve('.dart_tool/package_config.json').toFilePath(); diff --git a/tools/generate_package_config.dart b/tools/generate_package_config.dart index b147a285cb7..150f06fa584 100644 --- a/tools/generate_package_config.dart +++ b/tools/generate_package_config.dart @@ -113,28 +113,6 @@ void main(List args) { }, ); writeIfDifferent(configFile, packageConfig.generateJson('..')); - - // Also generate the repo's .packages file. - var packagesFile = File(join(repoRoot, '.packages')); - var buffer = StringBuffer(''' -# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. -# -# This file is generated; do not edit. To re-generate, run: -# 'dart tools/generate_package_config.dart'. - -'''); - for (var package in packages) { - final name = package.name; - final rootUri = package.rootUri; - final packageUri = package.packageUri; - - if (packageUri != null && packageUri != '.nonexisting') { - buffer.writeln('$name:${posix(rootUri)}/${posix(packageUri)}'); - } - } - writeIfDifferent(packagesFile, buffer.toString()); } /// Writes the given [contents] string to [file] if the contents are different