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

Implement writer::Tee #160

Merged
merged 17 commits into from
Nov 17, 2021
Merged

Implement writer::Tee #160

merged 17 commits into from
Nov 17, 2021

Conversation

ilslv
Copy link
Member

@ilslv ilslv commented Nov 15, 2021

Synopsis

For now cucumber can't output to multiple terminating Writers: Basic, JUnit or Json.

Solution

Implement writer::Tee

Checklist

  • Created PR:
    • In draft mode
    • Name contains Draft: prefix
    • Name contains issue reference
    • Has assignee
  • Documentation is updated (if required)
  • Tests are updated (if required)
  • Changes conform code style
  • CHANGELOG entry is added (if required)
  • FCM (final commit message) is posted
    • and approved
  • Review is completed and changes are approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • Draft: prefix is removed
    • All temporary labels are removed

@ilslv ilslv added the enhancement Improvement of existing features or bugfix label Nov 15, 2021
@ilslv ilslv added this to the 0.11 milestone Nov 15, 2021
@ilslv ilslv self-assigned this Nov 15, 2021
@tyranron
Copy link
Member

Let's name it writer::Tee. It's more wide-known terminology/slang for such naming following the tee utility.

@ilslv ilslv changed the title Draft: Implement writer::Join Draft: Implement writer::Tee Nov 15, 2021
# Conflicts:
#	.github/workflows/ci.yml
#	CHANGELOG.md
#	Cargo.toml
#	README.md
#	book/src/Features.md
#	src/writer/json.rs
@ilslv
Copy link
Member Author

ilslv commented Nov 16, 2021

FCM

Implement `writer::Tee` for outputting to multiple terminating `Writer`s simultaneously (#160)

- add `writer::discard::Arbitrary` and `writer::discard::Failure` for provoding no-op implementations of corresponding traits
- move `World` type parameter of `WriterExt` to methods

@ilslv ilslv marked this pull request as ready for review November 16, 2021 07:19
@ilslv ilslv changed the title Draft: Implement writer::Tee Implement writer::Tee Nov 16, 2021
@ilslv ilslv requested a review from tyranron November 17, 2021 08:03
Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

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

Discussed in a talk to:

  1. Make ArbitraryDiscard and FailureDiscard wrappers for packing Writers which doesn't implement ArbitraryWriter and FailureWriter into writer::Tee, while making writer::Tee always calling both left and right.
  2. Move W type parameter of writer::Ext to methods.

@tyranron tyranron marked this pull request as draft November 17, 2021 09:30
@ilslv ilslv marked this pull request as ready for review November 17, 2021 11:56
@ilslv ilslv requested a review from tyranron November 17, 2021 11:56
@tyranron tyranron merged commit ed478b2 into main Nov 17, 2021
@tyranron tyranron deleted the writer-join branch November 17, 2021 15:31
@tyranron
Copy link
Member

@ilslv thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants