melos icon indicating copy to clipboard operation
melos copied to clipboard

fix: Melos publish fails to detect Flutter projects and runs Dart commands

Open vbuberen opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Version

2.9.0

Description

I am trying to publish a new release for Plus Plugins packages: https://github.com/fluttercommunity/plus_plugins We have the following guide for releases: https://github.com/fluttercommunity/plus_plugins/blob/main/CONTRIBUTING.md#run-a-release

Commands like version or bootstrap run correctly and get dependencies (see the attached screenshots). The problematic command is melos publish. For some reason it always runs dart pub get even if I try to use filtering like melos publish --flutter (thought it might help).

One of maintainters mentioned that he also had such issues on his Linux machine and ended up with publishing from MacOS machine he has. For me the problem happens on a MacOS machine.

Steps to reproduce

  1. Open plus_plugins root in IDE or in terminal.
  2. Run melos bootstrap (Tried without this command as well).
  3. Run melos version --no-git-tag-version.
  4. Run melos publish and see the output.

Expected behavior

Melos runs publish using flutter pub get and completes dry run successfully with report if packages are publishable.

Screenshots

melos bootstrap output (start and end just to show that it completes successfully). Screenshot 2023-03-07 at 19 22 58 Screenshot 2023-03-07 at 19 23 10

melos publish output Screenshot 2023-03-07 at 19 23 45 Screenshot 2023-03-07 at 19 25 12

Additional context and comments

Tried to run Melos commands from MacOS terminal as well as built-in terminal in Android Studio

vbuberen avatar Mar 07 '23 17:03 vbuberen