You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for an issue that matches the one I want to file, without success.
Problem Description
The current API for file searching is extremely confusing, hard to explain and is full of edge cases that people rely on and then open issues/PRs with "fixes" when they break.
Finder should return a list of file paths that match a certain search criteria in the specific filesystem. (Viper uses afero as a filesystem abstraction under the hood. I don't see that going away in the short run, ie. we can't easily replace it with io/fs, so I believe it's safe to use it in the new interface)
How that search criteria is applied is up to the implementation which allows users to extend the file search implementation.
The reference implementation for Finder is locafero. To remain backwards compatible on the v1 branch we can use locafero under the hood.
Alternatives Considered
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Preflight Checklist
Problem Description
The current API for file searching is extremely confusing, hard to explain and is full of edge cases that people rely on and then open issues/PRs with "fixes" when they break.
Examples:
The current implementation is also not very extensible (people can't workaround issues).
Proposed Solution
Deprecate the current API (
SetConfigName
,AddConfigPath
) and replace it with aFinder
interface:Finder
should return a list of file paths that match a certain search criteria in the specific filesystem. (Viper uses afero as a filesystem abstraction under the hood. I don't see that going away in the short run, ie. we can't easily replace it with io/fs, so I believe it's safe to use it in the new interface)How that search criteria is applied is up to the implementation which allows users to extend the file search implementation.
The reference implementation for
Finder
is locafero. To remain backwards compatible on the v1 branch we can use locafero under the hood.Alternatives Considered
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: