Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Invalid include_file_not_found when pedantic added to dev_dependencies #72

Closed
awhitford opened this issue Oct 23, 2020 · 5 comments
Closed

Comments

@awhitford
Copy link

After adding pedantic to a project, I am seeing this warning:

warning • The include file package:pedantic/analysis_options.yaml in /Users/anthony/github/awhitford/Animated-Text-Kit/analysis_options.yaml
       cannot be found • analysis_options.yaml:1:11 • include_file_not_found

The analysis_options.yaml is as prescribed:

include: package:pedantic/analysis_options.yaml

Since I am only using pedantic for lints, I added it to dev_dependencies.

Note that the rules seem to be working and I am seeing results from flutter analyze.

However, I noticed that this warning goes away if I move pedantic to dependencies. (But I don't really want to because it should not be necessary.) As a result, this warning looks invalid.

@llucax
Copy link

llucax commented Oct 23, 2020

I'm having the same but using include: package:pedantic/analysis_options.1.9.0.yaml:

warning • The include file package:pedantic/analysis_options.1.9.0.yaml in /my/project/analysis_options.yaml cannot be found •
       analysis_options.yaml:1:11 • include_file_not_found

I think this started after a flutter upgrade I just did (on the stable channel).

$ flutter --version
Flutter 1.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 84f3d28555 (7 days ago) • 2020-10-15 16:26:19 -0700
Engine • revision b8752bbfff
Tools • Dart 2.10.2

@awhitford
Copy link
Author

I too am using 1.22.2:

Flutter 1.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 84f3d28555 (8 days ago) • 2020-10-15 16:26:19 -0700
Engine • revision b8752bbfff
Tools • Dart 2.10.2

@davidmorgan
Copy link
Contributor

Not sure what could have changed--maybe dev dependencies are being pulled to somewhere different that the analyzer can't find?

@bwilkerson any ideas please?

@awhitford
Copy link
Author

This looks related: dart-lang/sdk#42910

@awhitford
Copy link
Author

I figured it out... I needed to add pedantic also to the pubspec.yaml in the example folder. I was getting results from the main package, but when the examples were being processed, that is when the warning emitted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants