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

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

Closed
1 task done
mahmuttaskiran opened this issue Nov 15, 2024 · 4 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@mahmuttaskiran
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues.

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

  • Run flutter clean for each package to delete the pubspec.lock files: melos exec --flutter clean.
  • Run melos analyze.

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 mahmuttaskiran added the bug Something isn't working label Nov 15, 2024
@mahmuttaskiran
Copy link
Contributor Author

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

@mahmuttaskiran
Copy link
Contributor Author

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

@spydon
Copy link
Collaborator

spydon commented Nov 15, 2024

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

@mahmuttaskiran
Copy link
Contributor Author

mahmuttaskiran commented Nov 15, 2024

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.
#793 The issue is dissolved for flutter workspaces.

@mahmuttaskiran mahmuttaskiran changed the title fix: melos analyze is not running pub get in packages fix: melos analyze is running dart analyze for Flutter packages Nov 16, 2024
spydon pushed a commit that referenced this issue Nov 16, 2024
## Description
Current `melos analyze` command is running `dart analyze` instead of
`flutter analyze` on flutter projects
#792

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ] ✨ `feat` -- New feature (non-breaking change which adds
functionality)
- [x] 🛠️ `fix` -- Bug fix (non-breaking change which fixes an issue)
- [ ] ❌ `!` -- Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] 🧹 `refactor` -- Code refactor
- [ ] ✅ `ci` -- Build configuration change
- [ ] 📝 `docs` -- Documentation
- [ ] 🗑️ `chore` -- Chore
@spydon spydon closed this as completed Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants