-
Notifications
You must be signed in to change notification settings - Fork 220
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: Run flutter analyze
for flutter packages
#793
Conversation
To view this pull requests documentation preview, visit the following URL: Documentation is deployed and generated using docs.page. |
How come you need to run |
Let me clarify. For Flutter projects using Melos, when neither However, You can reproduce this issue in any Flutter repository using Melos by running Note: With this fix, do not try to reproduce this issue and understand the problem in the Melos repository itself, as it is not a Flutter workspace and will always use dart analyze, which does not run pub get. |
Hello @spydon, I hope you are doing well. According to the Flutter documentation, we should use ![]() |
1f69aef
to
adb6939
Compare
If that is the case that flutter analyze is recommended over dart analyze for flutter projects (which isn't actually stated in the docs like you say), we should also follow it the other way around, Dart packages should be using |
If you don't run |
They are saying
We are working on a substantial project that includes 287 packages. In our CI pipeline, we run static analysis as a separate job parallel to other tasks like unit testing and application building. To minimize CI time, we prefer not to execute To address this, we have opted to use melos exec -- flutter analyze While this works, we would prefer to achieve the same outcome using |
Sorry, my bad. I still don't think there is a difference anymore though more than that it runs
Are your packages not using each other in your repository? If they are and you aren't manually setting path dependencies you won't be running static analysis properly on the actual state of the repo, since it will be pulling down released versions instead. |
Apparently it is doing some platform specific stuff too, so it could indeed be worth running it instead of Once the workspace feature from the pub team has been released it won't be a problem anymore though. |
Yes, the packages are interdependent, and we are using path dependencies. We tried running I've updated the PR to include the check for Dart packages. I don't think it's an optimal solution, but it's what I could do with the current implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, thanks for your contribution!
flutter analyze
for flutter packages
Description
Current
melos analyze
command is runningdart analyze
instead offlutter analyze
on flutter projects#792
Type of Change
feat
-- New feature (non-breaking change which adds functionality)fix
-- Bug fix (non-breaking change which fixes an issue)!
-- Breaking change (fix or feature that would cause existing functionality to change)refactor
-- Code refactorci
-- Build configuration changedocs
-- Documentationchore
-- Chore