From 15837d1562f8e9c3748b23df8b4b8d018e4f5796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Tue, 9 Sep 2025 18:06:14 +0200 Subject: [PATCH 1/5] build: Use workspace feature --- mcp_examples/pubspec.yaml | 5 +---- pkgs/dart_mcp/pubspec.yaml | 1 + pkgs/dart_mcp_server/pubspec.yaml | 5 +---- .../test_fixtures/counter_app/pubspec.yaml | 3 ++- .../test_fixtures/dart_cli_app/pubspec.yaml | 1 + pubspec.yaml | 12 ++++++++++++ 6 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 pubspec.yaml diff --git a/mcp_examples/pubspec.yaml b/mcp_examples/pubspec.yaml index a064d98d..4e457d8c 100644 --- a/mcp_examples/pubspec.yaml +++ b/mcp_examples/pubspec.yaml @@ -3,6 +3,7 @@ description: Examples for the Dart MCP package. publish_to: none version: 0.0.1 +resolution: workspace environment: sdk: ^3.7.0 @@ -14,7 +15,3 @@ dependencies: google_generative_ai: ^0.4.7 path: ^1.9.1 stream_channel: ^2.1.4 - -dependency_overrides: - dart_mcp: - path: ../pkgs/dart_mcp diff --git a/pkgs/dart_mcp/pubspec.yaml b/pkgs/dart_mcp/pubspec.yaml index 04a31543..086d4bb3 100644 --- a/pkgs/dart_mcp/pubspec.yaml +++ b/pkgs/dart_mcp/pubspec.yaml @@ -4,6 +4,7 @@ description: A package for making MCP servers and clients. repository: https://github.com/dart-lang/ai/tree/main/pkgs/dart_mcp issue_tracker: https://github.com/dart-lang/ai/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Adart_mcp +resolution: workspace environment: sdk: ^3.7.0 diff --git a/pkgs/dart_mcp_server/pubspec.yaml b/pkgs/dart_mcp_server/pubspec.yaml index c7346639..a6c755e4 100644 --- a/pkgs/dart_mcp_server/pubspec.yaml +++ b/pkgs/dart_mcp_server/pubspec.yaml @@ -3,6 +3,7 @@ description: >- An MCP server for Dart projects, exposing various developer tools to AI models. publish_to: none +resolution: workspace environment: sdk: ^3.9.0-163.0.dev @@ -46,7 +47,3 @@ dev_dependencies: test: ^1.25.15 test_descriptor: ^2.0.2 test_process: ^2.1.1 - -dependency_overrides: - dart_mcp: - path: ../dart_mcp diff --git a/pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml b/pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml index 47bd867d..022f3bf9 100644 --- a/pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml +++ b/pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml @@ -1,8 +1,9 @@ name: counter_app description: "A new Flutter project." -publish_to: 'none' +publish_to: "none" version: 0.1.0-wip +resolution: workspace environment: sdk: ^3.6.1 diff --git a/pkgs/dart_mcp_server/test_fixtures/dart_cli_app/pubspec.yaml b/pkgs/dart_mcp_server/test_fixtures/dart_cli_app/pubspec.yaml index d4bd315c..8cd45c7e 100644 --- a/pkgs/dart_mcp_server/test_fixtures/dart_cli_app/pubspec.yaml +++ b/pkgs/dart_mcp_server/test_fixtures/dart_cli_app/pubspec.yaml @@ -1,4 +1,5 @@ name: example_dart_cli_app publish_to: none +resolution: workspace environment: sdk: ^3.7.0 diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 00000000..3a9d6f1f --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,12 @@ +name: _ +publish_to: none + +environment: + sdk: ^3.6.1 + +workspace: + - mcp_examples/ + - pkgs/dart_mcp/ + - pkgs/dart_mcp_server/ + - pkgs/dart_mcp_server/test_fixtures/counter_app/ + - pkgs/dart_mcp_server/test_fixtures/dart_cli_app/ From 4e1c94cfadb921ce8aa006429ce29eedabaae04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Wed, 10 Sep 2025 09:19:35 +0200 Subject: [PATCH 2/5] fix: Align dart_mcp constraints --- mcp_examples/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcp_examples/pubspec.yaml b/mcp_examples/pubspec.yaml index 4e457d8c..e404989b 100644 --- a/mcp_examples/pubspec.yaml +++ b/mcp_examples/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: args: ^2.7.0 async: ^2.13.0 cli_util: ^0.4.2 - dart_mcp: ^0.2.0 + dart_mcp: ^0.3.0 google_generative_ai: ^0.4.7 path: ^1.9.1 stream_channel: ^2.1.4 From c13598c37667bf17adfeb03a95d0e014cf3495b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Wed, 10 Sep 2025 09:20:19 +0200 Subject: [PATCH 3/5] chore: Tighten constraints --- mcp_examples/pubspec.yaml | 2 +- pkgs/dart_mcp/pubspec.yaml | 4 ++-- pkgs/dart_mcp_server/pubspec.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mcp_examples/pubspec.yaml b/mcp_examples/pubspec.yaml index e404989b..aba5fd6b 100644 --- a/mcp_examples/pubspec.yaml +++ b/mcp_examples/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: args: ^2.7.0 async: ^2.13.0 cli_util: ^0.4.2 - dart_mcp: ^0.3.0 + dart_mcp: ^0.3.4-wip google_generative_ai: ^0.4.7 path: ^1.9.1 stream_channel: ^2.1.4 diff --git a/pkgs/dart_mcp/pubspec.yaml b/pkgs/dart_mcp/pubspec.yaml index 086d4bb3..873a39de 100644 --- a/pkgs/dart_mcp/pubspec.yaml +++ b/pkgs/dart_mcp/pubspec.yaml @@ -11,11 +11,11 @@ environment: dependencies: async: ^2.13.0 collection: ^1.19.1 - json_rpc_2: ">=3.0.3 <5.0.0" + json_rpc_2: ^4.0.0 meta: ^1.16.0 stream_channel: ^2.1.4 stream_transform: ^2.1.1 dev_dependencies: dart_flutter_team_lints: ^3.2.1 - test: ^1.25.15 + test: ^1.26.1 diff --git a/pkgs/dart_mcp_server/pubspec.yaml b/pkgs/dart_mcp_server/pubspec.yaml index a6c755e4..bd88d1a5 100644 --- a/pkgs/dart_mcp_server/pubspec.yaml +++ b/pkgs/dart_mcp_server/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: args: ^2.7.0 async: ^2.13.0 collection: ^1.19.1 - dart_mcp: ^0.3.3 + dart_mcp: ^0.3.4-wip dds_service_extensions: ^2.0.1 devtools_shared: ^12.0.0 dtd: ^4.0.0 @@ -44,6 +44,6 @@ dev_dependencies: analyzer: ^7.5.2 dart_flutter_team_lints: ^3.2.1 pub_semver: ^2.2.0 - test: ^1.25.15 + test: ^1.26.1 test_descriptor: ^2.0.2 test_process: ^2.1.1 From 792d239c7bc140a29f63380e58b90c41378a4202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Thu, 11 Sep 2025 10:45:35 +0200 Subject: [PATCH 4/5] fix: Exclude flutter counter_app project from workspace to avoid making Flutter SDK a dependency during development --- pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml | 4 +++- pubspec.yaml | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml b/pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml index 022f3bf9..a8e6d24b 100644 --- a/pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml +++ b/pkgs/dart_mcp_server/test_fixtures/counter_app/pubspec.yaml @@ -3,7 +3,9 @@ description: "A new Flutter project." publish_to: "none" version: 0.1.0-wip -resolution: workspace +# As this is a flutter project we exclude it from the workspace. +# This avoids making flutter SDK a dependency during development. +# resolution: workspace environment: sdk: ^3.6.1 diff --git a/pubspec.yaml b/pubspec.yaml index 3a9d6f1f..a356072a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,5 +8,8 @@ workspace: - mcp_examples/ - pkgs/dart_mcp/ - pkgs/dart_mcp_server/ - - pkgs/dart_mcp_server/test_fixtures/counter_app/ - pkgs/dart_mcp_server/test_fixtures/dart_cli_app/ +# The flutter counter_app is excluded from workspace +# This avoids making flutter SDK a dependency during +# development. +# - pkgs/dart_mcp_server/test_fixtures/counter_app/ From ac3e4c5d1274c9e69106b26c59faff680a8a536f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Thu, 11 Sep 2025 10:56:23 +0200 Subject: [PATCH 5/5] chore: Bump versions and dependencies --- mcp_examples/pubspec.yaml | 4 ++-- pkgs/dart_mcp/pubspec.yaml | 2 +- pkgs/dart_mcp_server/pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mcp_examples/pubspec.yaml b/mcp_examples/pubspec.yaml index aba5fd6b..3cf8518a 100644 --- a/mcp_examples/pubspec.yaml +++ b/mcp_examples/pubspec.yaml @@ -1,7 +1,7 @@ name: dart_mcp_examples description: Examples for the Dart MCP package. publish_to: none -version: 0.0.1 +version: 0.1.0 resolution: workspace environment: @@ -11,7 +11,7 @@ dependencies: args: ^2.7.0 async: ^2.13.0 cli_util: ^0.4.2 - dart_mcp: ^0.3.4-wip + dart_mcp: ^0.4.0-wip google_generative_ai: ^0.4.7 path: ^1.9.1 stream_channel: ^2.1.4 diff --git a/pkgs/dart_mcp/pubspec.yaml b/pkgs/dart_mcp/pubspec.yaml index 873a39de..d7fd77e1 100644 --- a/pkgs/dart_mcp/pubspec.yaml +++ b/pkgs/dart_mcp/pubspec.yaml @@ -1,5 +1,5 @@ name: dart_mcp -version: 0.3.4-wip +version: 0.4.0-wip description: A package for making MCP servers and clients. repository: https://github.com/dart-lang/ai/tree/main/pkgs/dart_mcp issue_tracker: https://github.com/dart-lang/ai/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Adart_mcp diff --git a/pkgs/dart_mcp_server/pubspec.yaml b/pkgs/dart_mcp_server/pubspec.yaml index bd88d1a5..6c665f7c 100644 --- a/pkgs/dart_mcp_server/pubspec.yaml +++ b/pkgs/dart_mcp_server/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: args: ^2.7.0 async: ^2.13.0 collection: ^1.19.1 - dart_mcp: ^0.3.4-wip + dart_mcp: ^0.4.0-wip dds_service_extensions: ^2.0.1 devtools_shared: ^12.0.0 dtd: ^4.0.0