Use pub workspace for the dart-pad monorepo
This sets up a pub workspace for each of the packages in this monorepo. This lets us run dart pub get from the root of the project and take advantage of a shared analysis server.
The pub did not create .dart_tools/package_config.json file. error is likely due to the fact that we have not finished adding support for workspaces to the flutter tool.
PR Health
Breaking changes :heavy_check_mark:
| Package | Change | Current Version | New Version | Needed Version | Looking good? |
|---|
Changelog Entry :heavy_check_mark:
| Package | Changed Files |
|---|
Changes to files need to be accounted for in their respective changelogs.
Coverage :heavy_check_mark:
| File | Coverage |
|---|
This check for test coverage is informational (issues shown here will not fail the PR).
API leaks :heavy_check_mark:
The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
| Package | Leaked API symbols |
|---|
License Headers :heavy_check_mark:
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
| Files |
|---|
| no missing headers |
All source files should start with a license header.
Unrelated files missing license headers
| Files |
|---|
| pkgs/samples/lib/brick_breaker.dart |
| pkgs/samples/lib/fibonacci.dart |
| pkgs/samples/lib/google_ai.dart |
| pkgs/samples/lib/hello_world.dart |
| pkgs/samples/lib/main.dart |
| pkgs/samples/lib/sunflower.dart |
Some of our GitHub Actions are using the Dart SDK (not the Flutter SDK), so when, for example, we dart pub get in dart_services, we get this warning:
Flutter users should use `flutter pub` instead of `dart pub`.
This seems like it should be a warning, since this is running in a Dart package, not a Flutter package. But since the workspace contains Flutter and Dart packages, our CI tools need to run flutter pub get on every individual package.
We could try to work around this by using the Flutter SDK everywhere, but that seems unnecessary. @devoncarew WDYT?
We could try to work around this by using the Flutter SDK everywhere, but that seems unnecessary. @devoncarew WDYT?
I haven't parsed everything that's going on here, but dart pub get should work everywhere? It'll work with dart packages, and if the dart cli is from a Dart sdk hosted in a flutter sdk, then that dart command will be able to resolve the flutter sdk packages, so dart pub get should work there as well.
if the dart cli is from a Dart sdk hosted in a flutter sdk, then that dart command will be able to resolve the flutter sdk packages
Is this true for workspaces too?
Closing in favor of https://github.com/dart-lang/dart-pad/pull/3151, we can just use flutter for the actions