[Proposal] SCO-0001: Generic file providers

Hi all,

Swift Configuration is an open-source project developed collaboratively with the community. Similar to other projects like Swift OpenAPI Generator, all significant changes require a proposal, regardless of whether they originate from the project's core maintainers or first-time contributors. The process ensures that everyone is held to the same standard, and it helps us gather comprehensive feedback from the community and guide the project's development.

The first proposal SCO-0001: Generic file providers for Swift Configuration is now up and In Review.

The review period will run until Oct 30th - please feel free to post your feedback either as a reply to this thread, or on the pull request.

Thanks!

8 Likes

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.

3 Likes