[linter] Remove special handling of linter package in generate_package_config

The linter is moved from third_party to pkg, and the old copy has
been removed from DEPS for weeks now. Remove the workaround that
ignores an old copy of linter in third_party/pkg/linter.
Users who have updated without running gclient sync -D will
now get an error that they have two copies of the
linter package, and they will get a message that they should
run gclient sync -D when they run gclient sync.

This completes the migration of the linter package into the SDK
source repository.

This reverts most of https://dart-review.googlesource.com/c/sdk/+/321722
leaving a small refactoring cleanup in place.

Bug: https://github.com/dart-lang/linter/issues/4411
Change-Id: Id5cdb3485e42e78743303d64370bc9f7899ad00e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325301
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: William Hesse <whesse@google.com>
This commit is contained in:
William Hesse 2023-09-11 17:18:05 +00:00 committed by Commit Queue
parent 79f650c4f8
commit 979f5d097c

View file

@ -86,12 +86,6 @@ void main(List<String> args) {
for (final p in packages)
if (p.name == name) p
];
if (name == 'linter' && matches.length > 1) {
final oldLinter = matches.firstWhere((p) =>
p.rootUri.replaceAll(r'\', '/').endsWith('third_party/pkg/linter'));
packages.remove(oldLinter);
matches.remove(oldLinter);
}
if (matches.length > 1) {
print('Duplicates found for package:$name');
for (var package in matches) {