-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework AssetHandler #870
Rework AssetHandler #870
Conversation
import 'dart:async'; | ||
|
||
/// A handler for Dart sources and related source maps. | ||
abstract class AssetHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we rename this to AssetReader
or something since it no longer expose a Handler
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was initially planning on doing that but thought you wouldn't like it, so I left it as is. Should have chatted with you first. I'll clean this up.
import 'asset_reader.dart'; | ||
|
||
/// A reader for resources provided by build runner. | ||
class BuildRunnerAssetReader implements AssetReader { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider ProxyServerAssetReader
or something along those lines? It doesn't really have anything build-runner specific it just delegates the reads to a proxy server.
AssetHandler
toAssetReader
and move tosrc/readers
AssetReader
API to make clear what resources need to be made available to DWDSBuildRunnerAssetHandler
toProxyServerAssetReader
ProxyServerAssetReader
intoproxy_server_asset_reader.dart
and move tosrc/readers
FrontendServerAssetReader
with similar functionalityreadAssetOrNull
logic intoProxyServerAssetReader
as it will likely not apply to theFrontendServerAssetReader
webdev
to adhere to the new API requirementsTowards #865