From a990da0992da8bce2aefae9ba4ea4591c458ec26 Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Tue, 26 Nov 2024 15:56:30 +0000 Subject: [PATCH] [dds/dap] Set supportsANSIStyling=true in DAP server capabilities This is the proper fix for https://github.com/Dart-Code/Dart-Code/issues/5302, which is to advertise to clients that we may use ansi color codes in output events. It requires increasing the DAP constraint because this field was added to the DAP package in 1.4.0 and we need to ensure anyone (like Flutter) building on top of this base debug adapter has a matching version. Change-Id: Ie595cda91389f1c7f031a657c96e9f7480b00933 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397521 Reviewed-by: Derek Xu Commit-Queue: Ben Konyi Reviewed-by: Ben Konyi --- pkg/dds/CHANGELOG.md | 2 ++ pkg/dds/lib/src/dap/adapters/dart.dart | 1 + pkg/dds/pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/dds/CHANGELOG.md b/pkg/dds/CHANGELOG.md index c2ad2e38ec4..1a38b0415c4 100644 --- a/pkg/dds/CHANGELOG.md +++ b/pkg/dds/CHANGELOG.md @@ -8,6 +8,8 @@ collected while execution is paused, while releasing them once execution resumes. - Updated `vm_service` constraint to ^14.3.0. +- [DAP] Updated `dap` constraint to ^1.4.0. +- [DAP] Set `supportsANSIStyling` to `true` in debug adapter capabilities to indicate that `Output` events might contain ansi color codes. # 4.2.7 - Added a new constant `RpcErrorCodes.kConnectionDisposed = -32010` for requests diff --git a/pkg/dds/lib/src/dap/adapters/dart.dart b/pkg/dds/lib/src/dap/adapters/dart.dart index 69f5ebb1612..2fefc3ae760 100644 --- a/pkg/dds/lib/src/dap/adapters/dart.dart +++ b/pkg/dds/lib/src/dap/adapters/dart.dart @@ -1249,6 +1249,7 @@ abstract class DartDebugAdapter