Skip to content

Commit

Permalink
Version 3.4.0-179.0.dev
Browse files Browse the repository at this point in the history
Merge 1818a2f into dev
  • Loading branch information
Dart CI committed Feb 27, 2024
2 parents 2876f56 + 1818a2f commit 67b2a25
Show file tree
Hide file tree
Showing 137 changed files with 712 additions and 821 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@
[#53218]: https://github.com/dart-lang/sdk/issues/53218
[#53785]: https://github.com/dart-lang/sdk/issues/53785

### Dart Runtime
- Dart VM flags and options can now be provided to any executable
generated using `dart compile exe` via the `DART_VM_OPTIONS` environment
variable. `DART_VM_OPTIONS` should be set to a list of comma-separated flags
and options with no whitespace. Options that allow for multiple values to be
provided as comma-separated values are not supported
(e.g., `--timeline-streams=Dart,GC,Compiler`).

Example of a valid `DART_VM_OPTIONS` environment variable:

```bash
DART_VM_OPTIONS=--random_seed=42,--verbose_gc
```

## 3.3.0

### Language
Expand Down
3 changes: 3 additions & 0 deletions docs/process/breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
The present document describes the Dart SDK philosophy for compatibility, and
process for breaking changes.

For a list of past breaking changes, see the
[dart.dev breaking changes](https://dart.dev/resources/breaking-changes) page.

## Dart compatibility and philosophy

Generally the Dart team strives to not make breaking changes, and to preserve
Expand Down
1 change: 1 addition & 0 deletions pkg/analysis_server/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ analyzer:

linter:
rules:
- avoid_redundant_argument_values
- flutter_style_todos
- library_annotations
- prefer_single_quotes
Expand Down
4 changes: 2 additions & 2 deletions pkg/analysis_server/benchmark/integration/driver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ extension on StringBuffer {
}

void writePadLeft(String text, int keyLength) {
write(text.padLeft(keyLength, ' '));
write(text.padLeft(keyLength));
write(' ');
}

void writePadRight(String text, int keyLength) {
write(text.padRight(keyLength, ' '));
write(text.padRight(keyLength));
write(' ');
}
}
4 changes: 0 additions & 4 deletions pkg/analysis_server/benchmark/perf/dart_analyze.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ abstract class AbstractCmdLineBenchmark extends Benchmark {
'$dartSdkPath/bin/dart',
['analyze', '--suppress-analytics', ...analyzeThis],
cwd: workingDir,
failOnError: true,
verbose: false,
);
stopwatchNoCache.stop();
Expand All @@ -49,7 +48,6 @@ abstract class AbstractCmdLineBenchmark extends Benchmark {
'$dartSdkPath/bin/dart',
['analyze', '--suppress-analytics', ...analyzeThis],
cwd: workingDir,
failOnError: true,
verbose: false,
);
stopwatchWithCache.stop();
Expand All @@ -73,7 +71,6 @@ abstract class AbstractCmdLineBenchmark extends Benchmark {
...analyzeThis
],
cwd: workingDir,
failOnError: true,
verbose: false,
stdout: stdout,
);
Expand All @@ -91,7 +88,6 @@ abstract class AbstractCmdLineBenchmark extends Benchmark {
...analyzeThis
],
cwd: workingDir,
failOnError: true,
verbose: false,
stdout: stdout,
);
Expand Down
52 changes: 26 additions & 26 deletions pkg/analysis_server/lib/protocol/protocol_generated.dart
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ class AnalysisGetLibraryDependenciesParams implements RequestParams {

@override
Request toRequest(String id) {
return Request(id, 'analysis.getLibraryDependencies', null);
return Request(id, 'analysis.getLibraryDependencies');
}

@override
Expand Down Expand Up @@ -2457,7 +2457,7 @@ class AnalysisReanalyzeParams implements RequestParams {

@override
Request toRequest(String id) {
return Request(id, 'analysis.reanalyze', null);
return Request(id, 'analysis.reanalyze');
}

@override
Expand All @@ -2476,7 +2476,7 @@ class AnalysisReanalyzeResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -2720,7 +2720,7 @@ class AnalysisSetAnalysisRootsResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -2808,7 +2808,7 @@ class AnalysisSetGeneralSubscriptionsResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -2895,7 +2895,7 @@ class AnalysisSetPriorityFilesResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -2996,7 +2996,7 @@ class AnalysisSetSubscriptionsResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -3279,7 +3279,7 @@ class AnalysisUpdateOptionsResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -3359,7 +3359,7 @@ class AnalyticsEnableResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand All @@ -3378,7 +3378,7 @@ class AnalyticsIsEnabledParams implements RequestParams {

@override
Request toRequest(String id) {
return Request(id, 'analytics.isEnabled', null);
return Request(id, 'analytics.isEnabled');
}

@override
Expand Down Expand Up @@ -3521,7 +3521,7 @@ class AnalyticsSendEventResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -3615,7 +3615,7 @@ class AnalyticsSendTimingResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -4615,7 +4615,7 @@ class CompletionRegisterLibraryPathsResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -4796,7 +4796,7 @@ class DiagnosticGetDiagnosticsParams implements RequestParams {

@override
Request toRequest(String id) {
return Request(id, 'diagnostic.getDiagnostics', null);
return Request(id, 'diagnostic.getDiagnostics');
}

@override
Expand Down Expand Up @@ -4885,7 +4885,7 @@ class DiagnosticGetServerPortParams implements RequestParams {

@override
Request toRequest(String id) {
return Request(id, 'diagnostic.getServerPort', null);
return Request(id, 'diagnostic.getServerPort');
}

@override
Expand Down Expand Up @@ -6978,7 +6978,7 @@ class EditListPostfixCompletionTemplatesParams implements RequestParams {

@override
Request toRequest(String id) {
return Request(id, 'edit.listPostfixCompletionTemplates', null);
return Request(id, 'edit.listPostfixCompletionTemplates');
}

@override
Expand Down Expand Up @@ -7852,7 +7852,7 @@ class ExecutionDeleteContextResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -8540,7 +8540,7 @@ class ExecutionSetSubscriptionsResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -10210,7 +10210,7 @@ class FlutterSetSubscriptionsResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -14920,7 +14920,7 @@ class ServerCancelRequestResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -15106,7 +15106,7 @@ class ServerGetVersionParams implements RequestParams {

@override
Request toRequest(String id) {
return Request(id, 'server.getVersion', null);
return Request(id, 'server.getVersion');
}

@override
Expand Down Expand Up @@ -15479,7 +15479,7 @@ class ServerOpenUrlRequestResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -15651,7 +15651,7 @@ class ServerSetClientCapabilitiesResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -15738,7 +15738,7 @@ class ServerSetSubscriptionsResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
Expand Down Expand Up @@ -15922,7 +15922,7 @@ class ServerShutdownParams implements RequestParams {

@override
Request toRequest(String id) {
return Request(id, 'server.shutdown', null);
return Request(id, 'server.shutdown');
}

@override
Expand All @@ -15941,7 +15941,7 @@ class ServerShutdownResult implements ResponseResult {

@override
Response toResponse(String id) {
return Response(id, result: null);
return Response(id);
}

@override
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 @@ -85,7 +85,6 @@ class CiderCompletionComputer {
enclosingNode: enclosingNode,
offset: offset,
unit: resolvedUnit.parsedUnit,
dartdocDirectiveInfo: null,
);

var suggestions = await performance.runAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class FlutterOutlineComputer {
protocol.FlutterOutline compute() {
var dartOutline = DartUnitOutlineComputer(
resolvedUnit,
withBasicFlutter: false,
).compute();

// Convert Dart outlines into Flutter outlines.
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/lib/src/g3/utilities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'package:dart_style/dart_style.dart';
/// Return a formatted string if successful, throws a [FormatterException] if
/// unable to format. Takes a string as input.
String format(String content) {
final code = SourceCode(content, uri: null, isCompilationUnit: true);
final code = SourceCode(content);
var formatter = DartFormatter();
SourceCode formattedResult;
formattedResult = formatter.formatSource(code);
Expand Down
10 changes: 5 additions & 5 deletions pkg/analysis_server/lib/src/handler/legacy/edit_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class EditFormatHandler extends LegacyHandler {
length = null;
}

var code = SourceCode(unformattedCode,
uri: null,
isCompilationUnit: true,
selectionStart: start,
selectionLength: length);
var code = SourceCode(
unformattedCode,
selectionStart: start,
selectionLength: length,
);
var formatter = DartFormatter(pageWidth: params.lineLength);
SourceCode formattedResult;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class EditFormatIfEnabledHandler extends LegacyHandler {
// TODO(brianwilkerson): Move this to a superclass when `edit.format` is
// implemented by a handler class so the code can be shared.
var originalContent = file.readAsStringSync();
var code = SourceCode(originalContent, uri: null, isCompilationUnit: true);
var code = SourceCode(originalContent);

var formatter = DartFormatter();
var formatResult = formatter.formatSource(code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,7 @@ class CompletionHandler
// Perform fuzzy matching based on the identifier in front of the caret to
// reduce the size of the payload.
final fuzzyPattern = suggestions.targetPrefix;
final fuzzyMatcher =
FuzzyMatcher(fuzzyPattern, matchStyle: MatchStyle.TEXT);
final fuzzyMatcher = FuzzyMatcher(fuzzyPattern);

final completionItems = suggestions.suggestions
.where((item) =>
Expand Down Expand Up @@ -945,8 +944,7 @@ class _FuzzyScoreHelper {

final FuzzyMatcher _matcher;

_FuzzyScoreHelper(this.prefix)
: _matcher = FuzzyMatcher(prefix, matchStyle: MatchStyle.TEXT);
_FuzzyScoreHelper(this.prefix) : _matcher = FuzzyMatcher(prefix);

bool completionItemMatches(CompletionItem item) =>
stringMatches(item.filterText ?? item.label);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ class TextDocumentRegistrations extends FeatureRegistration
change: TextDocumentSyncKind.Incremental,
willSave: false,
willSaveWaitUntil: false,
save: null,
));

@override
Expand Down
Loading

0 comments on commit 67b2a25

Please sign in to comment.