Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for managing supported packages #2824

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions pkgs/dart_services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ And to update the shared code from dartpad_shared, run:
dart tool/grind.dart copy-shared-source
```

### Modifying supported packages

Package dependencies are pinned using the `pub_dependencies_<CHANNEL>.yaml`
files. To make changes to the list of supported packages, you need to verify
that the dependencies resolve and update the pinned versions specified in the
`tool/dependencies` directory.

1. Edit the `lib/src/project_templates.dart` file to include changes to the
whitelisted list of packages.
2. Create the Dart and Flutter projects in the `project_templates/` directory:

```bash
grind build-project-templates
```

3. Run `pub upgrade` in the Dart or Flutter project in `project_templates/`
4. Run `grind update-pub-dependencies` to overwrite the
`tool/dependencies/pub_dependencies_<CHANNEL>.yaml` file for your current
channel.
5. Repeat the above steps for the latest version of each Flutter channel
(`main`, `beta` and `stable`)

## Redis

You can install and run a local redis cache. Run `sudo apt-get install redis-server` to install on Ubuntu or `brew install redis` for macOS.
Expand Down
1 change: 0 additions & 1 deletion pkgs/dart_services/tool/grind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ Future<void> _run(
}

@Task('Update pubspec dependency versions')
@Depends(buildProjectTemplates)
void updatePubDependencies() async {
final sdk = Sdk.fromLocalFlutter();
await _updateDependenciesFile(channel: sdk.channel, sdk: sdk);
Expand Down
Loading