Skip to content

Commit ed18424

Browse files
keertipCommit Queue
authored and
Commit Queue
committed
Revert "Add a pass to dart fix for pubspec changes"
This reverts commit 3c6ceb8. Reason for revert: This breaks flutter tests - running dart fix in the flutter_svg package adds a flutter_svg: any dependency line to pubspec.yaml. Original change's description: > Add a pass to dart fix for pubspec changes > > Fixes #48997 > > Change-Id: I543a550247920e121837f2bc6c75b5c1acecc670 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331740 > Commit-Queue: Keerti Parthasarathy <[email protected]> > Reviewed-by: Brian Wilkerson <[email protected]> Change-Id: I38a234b558d03c6c5c6c00f9ea55db7e1fbc7a89 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332171 Bot-Commit: Rubber Stamper <[email protected]> Reviewed-by: William Hesse <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent d96c71b commit ed18424

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

pkg/analysis_server/lib/src/services/correction/bulk_fix_processor.dart

-6
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,6 @@ class BulkFixProcessor {
169169
CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD: [
170170
DataDriven.new,
171171
],
172-
WarningCode.DEPRECATED_EXPORT_USE: [
173-
DataDriven.new,
174-
],
175172
HintCode.DEPRECATED_MEMBER_USE: [
176173
DataDriven.new,
177174
],
@@ -390,9 +387,6 @@ class BulkFixProcessor {
390387
}
391388
}
392389
}
393-
// Files in bin can have imports to the package itself, these should be
394-
// cleaned up.
395-
packages.remove(rootFolder.shortName);
396390

397391
// Compute changes to pubspec.
398392
var result = await _runPubspecValidatorAndFixGenerator(

pkg/dartdev/lib/src/analysis_server.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,10 @@ class AnalysisServer {
199199
}
200200

201201
Future<EditBulkFixesResult> requestBulkFixes(
202-
String filePath, bool inTestMode, List<String> codes, {bool updatePubspec = false}) {
202+
String filePath, bool inTestMode, List<String> codes) {
203203
return _sendCommand('edit.bulkFixes', params: <String, dynamic>{
204204
'included': [path.canonicalize(filePath)],
205205
'inTestMode': inTestMode,
206-
'updatePubspec': updatePubspec,
207206
if (codes.isNotEmpty) 'codes': codes,
208207
}).then((result) {
209208
return EditBulkFixesResult.fromJson(

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

-9
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,6 @@ To use the tool, run either ['dart fix --dry-run'] for a preview of the proposed
151151
// TODO(brianwilkerson) Be more intelligent about detecting infinite
152152
// loops so that we can increase [maxPasses].
153153
} while (pass < maxPasses && edits.isNotEmpty);
154-
// If there are no more dart edits, check if there are any changes
155-
// to pubspec
156-
if (edits.isEmpty && detailsMap.isNotEmpty) {
157-
var fixes = await server.requestBulkFixes(fixPath, inTestMode, [],
158-
updatePubspec: true);
159-
_mergeDetails(detailsMap, fixes.details);
160-
edits = fixes.edits;
161-
_applyEdits(server, edits);
162-
}
163154
return _FixRequestResult(details: detailsMap);
164155
}
165156

0 commit comments

Comments
 (0)