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

journal: adjust open() mechanisms to use a builder pattern #154

Merged
merged 5 commits into from
Nov 3, 2020

Conversation

codyps
Copy link
Owner

@codyps codyps commented Nov 3, 2020

  • JournalFiles doesn't properly cover all inclusions/exclusions
  • The various boolean arguments were leading to "boolean blindness" (ie: lack of clarity in what open() call options meant).
  • OpenOptions, OpenFileOptions, and OpenDirectoryOptions are added. These are patterned after std::fs::OpenOptions.
  • I've marked the commonly used Journal::open() as deprecated (and was somewhat annoyed by Using deprecated items within the crate that deprecated them issues warnings rust-lang/rust#47219).
  • I've removed Journal::open_directory and Journal::open_files entirely. They'll need to use the new journal::OpenFileOptions and journal::OpenDirectoryOptions.

@codyps codyps force-pushed the license-cleanup branch 2 times, most recently from fbeb4a5 to 4c5f05c Compare November 3, 2020 05:12
…support

Keeps `Journal::open()` for now, but mark it and `JournalFiles` as deprecated
@codyps
Copy link
Owner Author

codyps commented Nov 3, 2020

bors r+

bors bot added a commit that referenced this pull request Nov 3, 2020
154: journal: adjust open() mechanisms to use a builder pattern r=jmesmon a=jmesmon

 - `JournalFiles` doesn't properly cover all inclusions/exclusions
 - The various boolean arguments were leading to "boolean blindness" (ie: lack of clarity in what `open()` call options meant).
 - `OpenOptions`, `OpenFileOptions`, and `OpenDirectoryOptions` are added. These are patterned after `std::fs::OpenOptions`.
 - I've marked the commonly used `Journal::open()` as deprecated (and was somewhat annoyed by rust-lang/rust#47219).
 - I've removed `Journal::open_directory` and `Journal::open_files` entirely. They'll need to use the new `journal::OpenFileOptions` and `journal::OpenDirectoryOptions`.

Co-authored-by: Cody P Schafer <dev@codyps.com>
@bors
Copy link
Contributor

bors bot commented Nov 3, 2020

Canceled.

@codyps
Copy link
Owner Author

codyps commented Nov 3, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 3, 2020

Build succeeded:

@bors bors bot merged commit b826ff1 into master Nov 3, 2020
@bors bors bot deleted the license-cleanup branch November 3, 2020 23:46
@codyps codyps mentioned this pull request Nov 11, 2020
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.

1 participant