ci: flutter users should use 'flutter pub' instead of 'dart pub'.
Hi,
On CI, I have switched to Flutter main channel, but melos action fails when starts to do bootstrap, does it mean the action needs to be updated?
steps:
- name: ⬇️ Checkout repository
uses: actions/checkout@v3
- name: ⚙️ Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: main
- name: ⚙️ Setup Melos
uses: bluefireteam/melos-action@v3
So it works on Flutter stable, but not on main?
Does it work when running bootstrap locally with Flutter from main?
Locally works, it's using flutter pub get
Can you post the local output of flutter --version and melos --version?
melos 6.2.0
Flutter 3.27.0-1.0.pre.628 • channel main • [email protected]:flutter/flutter.git
Framework • revision a0c3060c68 (2 days ago) • 2024-11-24 21:34:37 -0500
Engine • revision ce1eb371ea
Tools • Dart 3.7.0 (build 3.7.0-183.0.dev) • DevTools 2.41.0-dev.2
Are you sure you have specified Flutter in the dependency list? It should be checking whether it is a Flutter package/app when running pub get here (by checking if Flutter is in the dependency list, so not just a transitive dependency): https://github.com/invertase/melos/blame/main/packages/melos/lib/src/commands/bootstrap.dart#L222
It's odd that it behaves differently locally and in the CI for you.
Locally when I call melos bs, it runs flutter pub get command as shown in above screenshot.
I have only one package which is just pure dart and has no reference to flutter. (http_interface).
Running "flutter pub get" in workspace packages...
pubspec.yaml on root directory, used by melos:
name: store
description: It's only used by melos
environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.7.0 <4.0.0"
dev_dependencies:
melos: ^6.2.0
lint: ^2.3.0