-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onanalyzer-technical-debtarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis servertype-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainableInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainable
Description
Apparently we add watchers for both the included directory, and nested package.
[newFile][path: /home/test/AndroidManifest.xml]
[_notifyWatchers]
/home/test/AndroidManifest.xml isWithin /home
/home/test/AndroidManifest.xml isWithin /home/test
This is a simple example that demonstrates that PhysicalResourceProvider
behaves the same as our MemoryResourceProvider
.
import 'package:analyzer/file_system/physical_file_system.dart';
main() {
PhysicalResourceProvider.INSTANCE
.getFolder('/Users/scheglov/tmp/20231203')
.watch()
.changes
.listen((event) {
print('[root][event: $event]');
});
PhysicalResourceProvider.INSTANCE
.getFolder('/Users/scheglov/tmp/20231203/test')
.watch()
.changes
.listen((event) {
print('[test][event: $event]');
});
}
When I create a.dart
file, both watches are notified.
[root][event: add /Users/scheglov/tmp/20231203/test/a.dart]
[test][event: add /Users/scheglov/tmp/20231203/test/a.dart]
@DanTup do you know if this is an expected behavior, or accidental?
I think this does not affect significantly analysis of Dart files, we add changed files to the list, but if it was not yet (or ever be) read as FileState
, we quickly exit from collectAffected()
.
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onanalyzer-technical-debtarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis servertype-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainableInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainable