chore: adopt Dart 3.9 toolchain — honest floor + tall-style reformat (T-353)
Raise the declared minimums in pubspec.yaml to what our deps already require: Flutter >=3.35.0 / Dart >=3.9.0 (was 3.19.0 / 3.5.0). alchemist 0.12 needs Flutter 3.32; Dart 3.9 first ships in Flutter 3.35, so 3.35 is the binding floor. Pin the exact build toolchain in .fvmrc (Flutter 3.44.1). Moving to the Dart 3.9 language level switches `dart format` to the new "tall" style and enables two new lints. This commit is the resulting mechanical churn, isolated from any behaviour change: - whole-tree `dart format` reformat (tall style) - `dart fix` for unnecessary_underscores + use_null_aware_elements No runtime behaviour change; `make test` green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,11 +20,7 @@ void main() {
|
||||
|
||||
setUp(() async {
|
||||
discoveryDir = await Directory.systemTemp.createTemp('clide-mcp-disc-');
|
||||
server = McpServer(
|
||||
workspaceRoot: '/var/mnt/test/clide-fixture',
|
||||
log: _silent(),
|
||||
discoveryDirOverride: discoveryDir.path,
|
||||
);
|
||||
server = McpServer(workspaceRoot: '/var/mnt/test/clide-fixture', log: _silent(), discoveryDirOverride: discoveryDir.path);
|
||||
await server.start();
|
||||
});
|
||||
|
||||
@@ -155,7 +151,7 @@ void main() {
|
||||
'method': 'tools/call',
|
||||
'params': {
|
||||
'name': 'mcp__ide__executeCode',
|
||||
'arguments': {'code': 'print(1)'}
|
||||
'arguments': {'code': 'print(1)'},
|
||||
},
|
||||
});
|
||||
final reply = jsonDecode(await replyFuture.timeout(const Duration(seconds: 2))) as Map<String, Object?>;
|
||||
@@ -214,12 +210,7 @@ void main() {
|
||||
dispatcher.register('echo', (req) async => IpcResponse.ok(id: req.id, data: {'echo': req.args['text']}));
|
||||
// A poor MCP fit — withheld from the tool surface (D-86).
|
||||
dispatcher.register('pane.tail', (req) async => IpcResponse.ok(id: req.id, data: const {}), mcpExpose: false);
|
||||
srv = McpServer(
|
||||
workspaceRoot: '/x',
|
||||
log: _silent(),
|
||||
discoveryDirOverride: disc.path,
|
||||
dispatcher: dispatcher,
|
||||
);
|
||||
srv = McpServer(workspaceRoot: '/x', log: _silent(), discoveryDirOverride: disc.path, dispatcher: dispatcher);
|
||||
await srv.start();
|
||||
});
|
||||
|
||||
@@ -234,8 +225,12 @@ void main() {
|
||||
final client = HttpClient();
|
||||
addTearDown(client.close);
|
||||
final resp = await (await client.getUrl(Uri.parse('http://127.0.0.1:${srv.port}/sse'))).close();
|
||||
final dataLines =
|
||||
resp.transform(utf8.decoder).transform(const LineSplitter()).where((l) => l.startsWith('data: ')).map((l) => l.substring(6)).asBroadcastStream();
|
||||
final dataLines = resp
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.where((l) => l.startsWith('data: '))
|
||||
.map((l) => l.substring(6))
|
||||
.asBroadcastStream();
|
||||
final endpoint = Completer<String>();
|
||||
final sub = dataLines.listen((d) {
|
||||
final m = RegExp(r'sessionId=([\w-]+)').firstMatch(d);
|
||||
@@ -312,8 +307,12 @@ void main() {
|
||||
final client = HttpClient();
|
||||
addTearDown(client.close);
|
||||
final resp = await (await client.getUrl(Uri.parse('http://127.0.0.1:${srv.port}/sse'))).close();
|
||||
final data =
|
||||
resp.transform(utf8.decoder).transform(const LineSplitter()).where((l) => l.startsWith('data: ')).map((l) => l.substring(6)).asBroadcastStream();
|
||||
final data = resp
|
||||
.transform(utf8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.where((l) => l.startsWith('data: '))
|
||||
.map((l) => l.substring(6))
|
||||
.asBroadcastStream();
|
||||
final ep = Completer<String>();
|
||||
final sub = data.listen((d) {
|
||||
final m = RegExp(r'sessionId=([\w-]+)').firstMatch(d);
|
||||
@@ -324,12 +323,14 @@ void main() {
|
||||
final replyFuture = data.firstWhere((s) => s.contains('"id":13'));
|
||||
final post = await client.postUrl(Uri.parse('http://127.0.0.1:${srv.port}/messages?sessionId=$sid'));
|
||||
post.headers.contentType = ContentType.json;
|
||||
post.write(jsonEncode({
|
||||
'jsonrpc': '2.0',
|
||||
'id': 13,
|
||||
'method': 'tools/call',
|
||||
'params': {'name': 'mcp__clide__echo', 'arguments': const {}},
|
||||
}));
|
||||
post.write(
|
||||
jsonEncode({
|
||||
'jsonrpc': '2.0',
|
||||
'id': 13,
|
||||
'method': 'tools/call',
|
||||
'params': {'name': 'mcp__clide__echo', 'arguments': const {}},
|
||||
}),
|
||||
);
|
||||
await post.close();
|
||||
final reply = jsonDecode(await replyFuture.timeout(const Duration(seconds: 2))) as Map<String, Object?>;
|
||||
expect((reply['result'] as Map)['isError'], isTrue);
|
||||
|
||||
Reference in New Issue
Block a user