Description
Description
In the Dart Analyzer's API, the parseFile
method takes a ResourceProvider
object. In the rest of my app, I'm using the Dart file
package to be able to replace the LocalFileSystem
with a MemoryFileSystem
during testing.
The ResourceProvider
API has a similar mechanism that lets me use a MemoryResourceProvider
, but what I really want is to just have a regular ResourceProvider
that takes a FileSystem
so I can just spoof the filesystem in one place, because using two means they are independent memory file systems that I have to keep in sync in my tests.
There doesn't appear to be a version of ResourceProvider
that takes a FileSystem
, but it doesn't look too hard to make one.
Could we provide one? Or, at least, would a PR that created one be considered, seeing as how it would probably add a dependency on the file
package? Alternatively, the file
package could provide a ResourceProvider
, but it's much more widely used than the analyzer package, and would add a dependency on the analyzer.