Skip to content

Commit

Permalink
Version 2.14.3
Browse files Browse the repository at this point in the history
* Cherry-pick 06bb799 to stable
* Cherry-pick 6207d1d to stable
* Cherry-pick d16ad3d to stable
  • Loading branch information
athomas committed Sep 29, 2021
2 parents 3300f32 + 2dc34aa commit 020b3ef
Show file tree
Hide file tree
Showing 15 changed files with 315 additions and 63 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 2.14.3 - 2021-09-30

This is a patch release that fixes:

- a code completion performance regression [flutter/flutter-intellij#5761][].
- debug information emitted by the Dart VM [#47289][].

[flutter/flutter-intellij#5761]:
https://github.com/flutter/flutter-intellij/issues/5761
[#47289]: https://github.com/dart-lang/sdk/issues/47289

## 2.14.2 - 2021-09-16

This is a patch release that fixes:
Expand Down
1 change: 0 additions & 1 deletion pkg/analysis_server/lib/src/cider/completion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class CiderCompletionComputer {
return await manager.computeSuggestions(
performance,
completionRequest,
enableImportedReferenceContributor: false,
enableOverrideContributor: false,
enableUriContributor: false,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ void computeIncludedSetList(
) {
int relevance;
if (importedUriSet.contains(library.uri)) {
return;
}
if (library.isDeprecated) {
relevance = importedRelevance;
} else if (library.isDeprecated) {
relevance = deprecatedRelevance;
} else {
relevance = otherwiseRelevance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class DartCompletionManager {
Future<List<CompletionSuggestion>> computeSuggestions(
OperationPerformanceImpl performance,
CompletionRequest request, {
bool enableImportedReferenceContributor = true,
bool enableOverrideContributor = true,
bool enableUriContributor = true,
CompletionPreference? completionPreference,
Expand Down Expand Up @@ -131,7 +130,6 @@ class DartCompletionManager {
CombinatorContributor(),
ExtensionMemberContributor(),
FieldFormalContributor(),
if (enableImportedReferenceContributor) ImportedReferenceContributor(),
KeywordContributor(),
LabelContributor(),
LibraryMemberContributor(),
Expand All @@ -150,6 +148,8 @@ class DartCompletionManager {
if (includedElementKinds != null) {
_addIncludedElementKinds(dartRequest);
_addIncludedSuggestionRelevanceTags(dartRequest);
} else {
contributors.add(ImportedReferenceContributor());
}

try {
Expand Down
21 changes: 2 additions & 19 deletions pkg/analysis_server/test/client/completion_driver_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,13 @@ abstract class AbstractCompletionDriverTest with ResourceProviderMixin {
}

void assertSuggestion({
bool allowMultiple = false,
required String completion,
ElementKind? element,
CompletionSuggestionKind? kind,
String? file,
}) {
expect(
suggestionWith(
allowMultiple: allowMultiple,
completion: completion,
element: element,
kind: kind,
Expand Down Expand Up @@ -184,17 +182,14 @@ project:${toUri('$projectPath/lib')}
completion: completion, element: element, kind: kind, file: file));

CompletionSuggestion suggestionWith({
bool allowMultiple = false,
required String completion,
ElementKind? element,
CompletionSuggestionKind? kind,
String? file,
}) {
final matches = suggestionsWith(
completion: completion, element: element, kind: kind, file: file);
if (!allowMultiple) {
expect(matches, hasLength(1));
}
expect(matches, hasLength(1));
return matches.first;
}

Expand Down Expand Up @@ -269,10 +264,7 @@ void f() {
}
''');

// TODO(brianwilkerson) There should be a single suggestion here after we
// figure out how to stop the duplication.
assertSuggestion(
allowMultiple: true,
completion: 'A',
element: ElementKind.CONSTRUCTOR,
kind: CompletionSuggestionKind.INVOCATION);
Expand All @@ -296,11 +288,7 @@ void f() {
^
}
''');

// TODO(brianwilkerson) There should be a single suggestion here after we
// figure out how to stop the duplication.
assertSuggestion(
allowMultiple: true,
completion: 'E.e',
element: ElementKind.ENUM_CONSTANT,
kind: CompletionSuggestionKind.INVOCATION);
Expand All @@ -325,10 +313,7 @@ void f() {
}
''');

// TODO(brianwilkerson) There should be a single suggestion here after we
// figure out how to stop the duplication.
assertSuggestion(
allowMultiple: true,
completion: 'A.a',
element: ElementKind.CONSTRUCTOR,
kind: CompletionSuggestionKind.INVOCATION);
Expand Down Expand Up @@ -656,15 +641,13 @@ void f() {
}
''');

// TODO(brianwilkerson) There should be a single suggestion here after we
// figure out how to stop the duplication.
expect(
suggestionsWith(
completion: 'Future.value',
file: '/sdk/lib/async/async.dart',
element: ElementKind.CONSTRUCTOR,
kind: CompletionSuggestionKind.INVOCATION),
hasLength(2));
hasLength(1));
}

Future<void> test_sdk_lib_suggestions() async {
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/test/lsp/completion_dart_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ void f() {
expect(completions, hasLength(1));
final resolved = await resolveCompletion(completions.first);
// It should not include auto-import text since it's already imported.
expect(resolved.detail, isNot(contains('Auto import from')));
expect(resolved.detail, isNull);
}

Future<void> test_suggestionSets_filtersOutAlreadyImportedSymbols() async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ void main() {

@reflectiveTest
class BoolAssignmentTest extends CompletionRelevanceTest {
@failingTest
Future<void> test_boolLiterals_imported() async {
// TODO(brianwilkerson) This test is arguably invalid given that there's no
// data to suggest that the boolean keywords should appear before a
// constructor in the list, but it does seem likely to be valid in this
// case, so we should investigate features that might cause this test to
// start passing again.
await addTestFile('''
foo() {
bool b;
Expand Down
4 changes: 4 additions & 0 deletions pkg/native_stack_traces/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.4.4

- Added handling of dynamic tables for testing.

## 0.4.3

- Exported some more of the ELF utilities for use in Dart tests.
Expand Down
2 changes: 1 addition & 1 deletion pkg/native_stack_traces/lib/elf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// 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.

export 'src/elf.dart' show Elf, Section, Symbol;
export 'src/elf.dart' show DynamicTable, DynamicTableTag, Elf, Section, Symbol;
export 'src/constants.dart'
show
isolateDataSymbolName,
Expand Down
Loading

0 comments on commit 020b3ef

Please sign in to comment.