`DartToolingDaemon` service methods are hard to discover
Since the service methods on DartToolingDaemon are provided in extensions, it is hard to discover them unless you depend on the dtd package. I tried to resolve this in #9449, but I'm not sure that solution makes sense. Maybe we just need better documentation?
Hi @Rexios80 - I'm trying to understand what your use case here. Are you trying to build a DevTools extension, or something else? DevTools Extensions should have access to any service method registered on DTD. Thanks!
Yes I wrote a devtools extension.
The documentation for devtools_extensions promises that you can build tools that interact with the file system:
https://github.com/flutter/devtools/blob/0327830448901920f739259364c3f2f624df5a03/packages/devtools_extensions/README.md?plain=1#L31
However the methods for filesystem access are only available in an extension on the DartToolingDaemon:
https://github.com/dart-lang/sdk/blob/3fa73a302bfe0770912e34a0e16f8d7e833d5d60/pkg/dtd/lib/src/services/file_system_service.dart#L15
Methods declared in extensions are only available if you directly depend on the package that defines them. Since the dtdManager comes from the devtools_app package:
https://github.com/flutter/devtools/blob/0327830448901920f739259364c3f2f624df5a03/packages/devtools_app/lib/src/shared/globals.dart#L48
You do not have access to the DartToolingDaemon extension methods without manually depending on the dtd package. This is not a good dev experience. I about gave up on writing the feature that needs file system access.