[Proposal] SCO-0001: Generic file providers

Looks like a great proposal. Overall +1 on going forward with this. A few minor comments:

public protocol FileParsingOptionsProtocol
public protocol FileConfigSnapshotProtocol

I am not a fan of suffixing the protocols with Protocol . Can we drop that? I see that there are more protocols that existed before this proposal but this it stood really out here.

init(data: Data, providerName: String, parsingOptions: ParsingOptions) throws

Instead of requiring Data can we make this take a RawSpan instead which will allow any bag-of-bytes type to work here.

public struct FileProviderSnapshotType: FileConfigSnapshotProtocol>
public final class ReloadingFileProvider<SnapshotType: FileConfigSnapshotProtocol>

Can the generic name be Snapshot instead? Type is already implied by it being a generic type.

7 Likes