Open Hesamedin opened 3 years ago
@pq or @devoncarew, I believe @Hesamedin, but is that really the way analyzer: exclude:
is supposed to work? It's counterintuitive to include test/
but not include lib/
. Should anything else change in this doc?
Affected doc section: Excluding files.
Hmmm. I agree that it feels odd but lib
is kind of special and think we probably want to just update the docs to capture the gotcha.
fyi @bwilkerson who might be interested.
I was unaware that lib
was being handles differently, and I don't believe that it should be. We've had a fairly large number of reports claiming that exclude
wasn't working; I'm wondering now how many of those cases were a result of this bug.
I think that we should
lib
to be included,lib
to the front of the pattern would fix the problem (and add a fix for this case), andlib
when necessary for the short term as a workaround to not break existing users.We can then send out a breaking change notice saying that we're going to remove support for patterns that are missing lib
and remove it in the release following the next release.
I was unaware that
lib
was being handles differently, and I don't believe that it should be. We've had a fairly large number of reports claiming thatexclude
wasn't working; I'm wondering now how many of those cases were a result of this bug.
I was unaware of this a well. Are we definitely doing this? A very casual perusal of pkg/analysis_server/lib/src/context_manager.dart and pkg/analyzer/lib/src/source/path_filter.dart doesn't turn up any lib/
hardcoding.
🤔
hrmmm. Not sure what I was thinking about but will dig a little and if I come up with anything will report back. Sorry for possibly muddying the waters!
@bwilkerson : Is this still an active concern?
I don't know the status of this issue. We should probably have someone look into it, but I'd probably give it a fairly low priority given how long it's been open and how few reports we've had, so I don't know how likely that is to happen. I'd be fine with closing this issue and inviting users to create an issue on the sdk repo if it's still causing problems.
Page URL: https://dart.dev/guides/language/analysis-options Page source: https://github.com/dart-lang/site-www/tree/master/src/_guides/language/analysis-options.md
Description of issue:
lib/
is part of the path to the file that is going to be excluded according to your doc at here. However, I realized that my folder is still visible to the analyzer.Fix/Solution: I removed the
lib/
from the path and Analyser is able to ignore my folder.Link to my question on Stackoverflow: https://stackoverflow.com/q/65566164/513413