Skip to content
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

Make FilenameProvider optional on PathProvider impl #547

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

DiamondJoseph
Copy link
Contributor

Closes #546

Required for Diamond expectation of file names.

@DiamondJoseph DiamondJoseph changed the title Adjust FilenameProvider signature Make FilenameProvider optional on PathProvider impl Aug 30, 2024
Copy link
Collaborator

@coretl coretl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are 2 use cases we need to support:

  1. Where Directory and Filename can be mixed together in different combinations, e.g. static directory + datestamp filename or static directory + uuid filename
  2. Where Directory and Filename are so site specific they will never be mixed together with other providers

To support 2 I think we need the option for a PathProvider that has no FilenameProvider, so it can make the whole path itself. For 1 then I think we need specific PathProviders (like StaticPathProvider) to support taking a FilenameProvider to delegate to

I think we can support all this by removing _filename_provider from the PathProvider protocol

@DiamondJoseph
Copy link
Contributor Author

After discussion IRL, we've opted to do both: remove the requirement for the PathProvider to have a FilenameProvider, but also adjust the signature of the FilenameProvider to match the PathProvider. This can propagate from the PathProvider call down.

@DiamondJoseph DiamondJoseph merged commit 3750ede into main Aug 30, 2024
18 checks passed
@DiamondJoseph DiamondJoseph deleted the FilenameProvider_args branch August 30, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PathProvider must take FilenameProvider and FilenameProvider protocol poor fit for DLS usecase
2 participants