-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
In Dart 3.5.0 analysis_options.yaml don't seem to be used under certain conditions #56416
Comments
Summary: The |
@keertip: do we think this is handled by your recent fixes? |
Yes, this should be handled with the recent fixes. @jellynoone, which channel of dart are you on? The latest dev channel has the fix, the other channels (stable, beta) probably not. |
Originally tested this on stable, 3.5.0. Since then tested this on dev, and everything works as expected. Will this be cherry-picked? |
The functionality is impaired. It is kindly requested to upgrade to at least a minimally operational Dart release before pushing to Flutter....!! |
To clarify what @lucasjinreal said, this is also broken in Flutter. It drove me crazy last night, and I was about to file a Dart-Code issue 🤣 |
@lishaduck Thank you for your expression! I uninstalled Flutter and reinstalled the beta channel, but the same issue occurred. Now this is truly troublesome! @jellynoone Beta channel actually not work at all!! |
As @keertip said,
Try Footnotes
|
No, it's master. |
main master dev stable beta .... We are just getting extremly confused. |
I was talking about the Dart channel here, not the Flutter branch. I was able to solve the issues I was having with analysis by editing the project at its root (where the |
@jellynoone Hi, what is the meaning of |
@lucasjinreal What I'm referring to as the project root is where the If you look at my initial report, you see I mention a project structure similar to the following: app/
main_app/ <- this is what I refer to as the root of the project
lib/
main.dart
analysis_options.yaml
pubspec.yaml
server_app/
extra/
package1/
package2/ The bug only occurs if you edit the project by opening Without knowing your project structure, I can't tell you anything more specific. But my guess is you have a mono-repo? Where there are multiple smaller packages / apps and you are editing them at the same time from a parent folder? |
In my case, I think I am actually opened the
typically I will |
In that case, it's a different issue. This issue is about includes in monorepos. |
To me, it's the same issue, but don't know why your solution works in your situation. |
I think they're different bugs, with similar symptoms. If analysis_options also doesn't work under other conditions now, that is also a bug, but not what this thread is about. |
Yes, the symptoms are identical (as indicated by the error messages), nonetheless, it does not necessarily imply that the root cause is not the same, unless we determine the reason. Currently, I can only wait for the next Flutter release. It is blocked. |
Tried to reproduce the issue with Dart 3.5.1 and I couldn't. |
Flutter 3.24.1 cherrypicked this, file a new issue if upgrading doesn't resolve it, @lucasjinreal |
Yahoo! dart-lang/sdk#56416 finally landed in Flutter stable!
I'm attaching a zip file containing the source code for a reproducer. source.zip
Summary:
When editing a project in a specific way,
analysis_options.yaml
file doesn't get picked up and the project lacks the enabled lints.The project structure is as follows:
Steps to reproduce:
app/
in an editormain_app/lib/main.dart
Running
dart analyze
onapp/
produces the same behavior.On the other hand, if we open
app/main_app
directly or rundart analyze
on it. We observe all the expected lints.In addition if we copy over the lints from
extra/lib/analysis_options.yaml
toapp/main_app/analysis_options.yaml
, we are correctly notified of all lints even when editing the project fromapp
.So it seems when a project is opened from a directory above it, lints from included files are not picked up.
dart --version
Dart SDK version: 3.5.0 (stable) (Tue Jul 30 02:17:59 2024 -0700) on "macos_arm64"
Perhaps this is related to #55975.
The text was updated successfully, but these errors were encountered: