Skip to content

Commit

Permalink
Version 3.4.0-20.0.dev
Browse files Browse the repository at this point in the history
Merge aaca6ce into dev
  • Loading branch information
Dart CI committed Jan 12, 2024
2 parents 38c6790 + aaca6ce commit bff80f6
Show file tree
Hide file tree
Showing 38 changed files with 1,494 additions and 1,549 deletions.
6 changes: 3 additions & 3 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ vars = {
"reclient_version": "git_revision:f3883c2237b0eb9cc9524cb571b5ab8378f257e4",

# Update from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core
"fuchsia_sdk_version": "version:16.20231105.3.1",
"fuchsia_sdk_version": "version:17.20240105.3.1",
"download_fuchsia_deps": False,

# Ninja, runs the build based on files generated by GN.
Expand Down Expand Up @@ -188,7 +188,7 @@ vars = {
"usage_rev": "e99690ae6d5fa9ec24ac5218bcd3621e8e3ae8a9",
"vector_math_rev": "38a00c35575b71a095903467141e5ee60c94d011",
"watcher_rev": "66cd694ffb7ee6e09ff0cde6c9f788aa47ee1a23",
"web_rev": "26c769a7a3d3162ad31ab3dd909c004e63f4d934",
"web_rev": "dd4bb852c6e4fbea7a8177328b065a645bf7e101",
"web_socket_channel_rev": "5241175e7c66271850d6e75fb9ec90068f9dd3c4", # https://github.com/dart-lang/sdk/issues/54165
"webdev_rev": "c08a65c93c8504af27bf9169d17037e6abf3cd9c",
"webdriver_rev": "2c1b6f8b9d684caf62d72bb327c24f738a4e7455",
Expand Down Expand Up @@ -661,7 +661,7 @@ Var("dart_root") + "/third_party/pkg/tar":
"packages": [
{
"package": "chromium/fuchsia/test-scripts",
"version": "version:2@542d79b983ec1cdf95d9cb3aea0ea528a4b3569d",
"version": "version:2@49064713a73ae92d8c28164938b97869afd336aa",
}
],
"condition": 'download_fuchsia_deps',
Expand Down
3 changes: 1 addition & 2 deletions build/fuchsia/with_envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

import os
import platform
import signal
import subprocess
import sys
import time

sys.path.insert(
0,
Expand Down Expand Up @@ -50,6 +48,7 @@ def Main():
except:
# Use terminate / SIGTERM to allow the subprocess exiting cleanly.
proc.terminate()
return proc.returncode


if __name__ == '__main__':
Expand Down
5 changes: 1 addition & 4 deletions pkg/analysis_server/lib/src/cider/completion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,7 @@ class CiderCompletionComputer {
performance.getDataInt('libraryCount').increment();

var path = element.source.fullName;
var signature = _fileResolver.getLibraryLinkedSignature(
path: path,
performance: performance,
);
var signature = _fileResolver.getLibraryLinkedSignature(path);

var cacheEntry = _cache._importedLibraries[path];
if (cacheEntry == null || cacheEntry.signature != signature) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/lib/src/lsp/snippets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class SnippetBuilder {

/// Regex used by [escapeSnippetChoiceText].
static final _escapeSnippetChoiceTextRegex =
RegExp(r'[$}\\\|,]'); // Replace any of $ } \ | ,
RegExp(r'[\\\|,]'); // Replace any of \ | ,

/// Regex used by [escapeSnippetPlainText].
static final _escapeSnippetPlainTextRegex =
Expand Down
7 changes: 0 additions & 7 deletions pkg/analysis_server/test/integration/analysis/error_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,8 @@ void f() {
await sendServerSetSubscriptions([ServerService.STATUS]);
await sendAnalysisUpdateContent({filePath: AddContentOverlay(content)});
await sendAnalysisSetAnalysisRoots([packagePath], []);

await analysisFinished;

// TODO(scheglov): https://github.com/dart-lang/sdk/issues/54577
// `await analysisFinished` should be enough, but was not promised.
while (currentAnalysisErrors[filePath] == null) {
await pumpEventQueue();
}

expect(currentAnalysisErrors[filePath], isList);
var errors = existingErrorsForFile(filePath);
expect(errors, hasLength(1));
Expand Down
33 changes: 33 additions & 0 deletions pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,39 @@ class A {
);
}

/// Ensure braces aren't over-escaped in snippet choices.
/// https://github.com/dart-lang/sdk/issues/54403
Future<void> test_snippets_createMissingOverrides_recordBraces() async {
const content = '''
abstract class A {
void m(Iterable<({int a, int b})> r);
}
class ^B extends A {}
''';

const expectedContent = r'''
abstract class A {
void m(Iterable<({int a, int b})> r);
}
class B extends A {$0
@override
void m(${1|Iterable<({int a\, int b})>,Object|} ${2:r}) {
// TODO: implement m
}
}
''';

setSnippetTextEditSupport();
await verifyActionEdits(
content,
expectedContent,
kind: CodeActionKind('quickfix.create.missingOverrides'),
title: 'Create 1 missing override',
);
}

Future<void>
test_snippets_extractVariable_functionTypeNestedParameters() async {
const content = '''
Expand Down
9 changes: 6 additions & 3 deletions pkg/analysis_server/test/lsp/snippets_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@ class SnippetBuilderTest {
..appendChoice({r'a', r'b'})
..appendChoice({}, placeholderNumber: 6)
..appendChoice({r'aaa', r'bbb'}, placeholderNumber: 12)
..appendChoice({r'aaa', r'bbb $ bbb | bbb } bbb'});
..appendChoice({r'aaa', r'bbb \ bbb $ bbb | bbb , bbb } bbb'});

expect(
builder.value,
r'${1:a}'
r'${2|a,b|}'
r'$6'
r'${12|aaa,bbb|}'
r'${13|aaa,bbb \$ bbb \| bbb \} bbb|}',
// Only pipes (delimiter), comma (separator) and backslashes (the escape
// character) are escaped in choices. Not dollars or braces.
// https://github.com/microsoft/vscode/issues/201059
r'${13|aaa,bbb \\ bbb $ bbb \| bbb \, bbb } bbb|}',
);
}

Expand Down Expand Up @@ -157,7 +160,7 @@ var a = 1;
);
// Choices are never 0th placeholders, so this is `$1`.
expect(result, equals(r'''
var ${1|a,aaa,bbb\${\}\,\|,ccc|} = 1;
var ${1|a,aaa,bbb${}\,\|,ccc|} = 1;
'''));
}

Expand Down
Loading

0 comments on commit bff80f6

Please sign in to comment.