phntmxyz / sidekick

Your personal CLI for your Flutter project
https://pub.dev/packages/sidekick
Apache License 2.0
56 stars 5 forks source link

Add possibility to update Dart SDK version of `sidekickDartRuntime` #149

Open Giuspepe opened 1 year ago

Giuspepe commented 1 year ago

Currently the sidekickDartRuntime's Dart SDK version can only be updated by increasing the minimum version constraint in the sidekick CLI's pubspec.yaml and running the CLI's entrypoint. This is not very intuitive and unnecessarily coupled. So we should add another way to update the sidekickDartRuntime's Dart SDK version.

We could add it to the sidekick update command, e.g. like this: sidekick update <{cli (default), dart}> [{<version>, latest}]

sidekick update cli or sidekick update to update the sidekick CLI (current implementation of the command)

sidekick update dart to update sidekickDartRuntime (new)

passsy commented 1 year ago

I'd make it a separate command <cli> sidekick upgrade-embedded-sdk

passsy commented 1 year ago

Updating the embedded dart sdk is now possible with <cli> sidekick update.

@Giuspepe Please update the error message https://github.com/phntmxyz/sidekick/blob/914bde512e4df52f518da91ae3bf308a9ecfa98a/sidekick_core/lib/src/commands/plugins/install_plugin_command.dart#L255

Giuspepe commented 1 year ago

Updated the error message in #176

I guess we can close this issue then for now.

In the future it would still be nice to have a separate upgrade-embedded-sdk command and to save the embedded sdk version in the pubspec in the sidekick block instead of parsing it from environment: sdk: ..., i.e.

sidekick:
  cli_version: 0.13.1
  embedded_sdk_version: x.y.z