invertase / melos

🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
https://melos.invertase.dev/~melos-latest
Apache License 2.0
1.18k stars 206 forks source link

fix: `melos analyze` is running `dart analyze` for Flutter packages #792

Open mahmuttaskiran opened 4 days ago

mahmuttaskiran commented 4 days ago

Is there an existing issue for this?

Version

6.1.0

Description

When I run melos analyze, it fetches dependencies for the root project, allowing the analysis to succeed for the root. However, for the packages, it fails because it does not resolve dependencies before running the analysis for each package.

Steps to reproduce

Expected behavior

It should resolve the packages for each package if needed. Like flutter analyze do.

Screenshots

No response

Additional context and comments

No response

mahmuttaskiran commented 4 days ago

Additional info: running melos exec -- flutter analyze is working as expected

mahmuttaskiran commented 4 days ago

One more info: It's running dart analyze even for flutter workspaces, and that's why it's not resolving dependencies

spydon commented 4 days ago

You're always supposed to have run bootstrap (which runs pub get) before you run any Melos commands.

mahmuttaskiran commented 4 days ago

You're always supposed to have run bootstrap (which runs pub get) before you run any Melos commands.

But that's not the case with the flutter analyze command. It resolves dependencies (runs pub get) before analyzing, if needed. We've delivered a fix for this. https://github.com/invertase/melos/pull/793 The issue is dissolved for flutter workspaces.