Skip to content

Conversation

@andersio
Copy link
Member

In case we might want to add new flatten strategies in the future without a major version bump, FlattenStrategy now hides its enum nature. This on paper breaks switches over FlattenStrategy, but I don't see any real use case that would be affected.

Checklist

  • Updated CHANGELOG.md.

return true

default:
return false
Copy link
Member

Choose a reason for hiding this comment

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

Not saying I agree with this change, but if we merge it, it doesn’t make sense to keep the Equatable conformance.

/// The resulting producer will complete only when all inputs have
/// completed.
public static let merge = FlattenStrategy.concurrent(limit: .max)
public static var merge: FlattenStrategy {
Copy link
Member

Choose a reason for hiding this comment

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

This doesn’t need to be a derived property, why not keep a constant?

@NachoSoto
Copy link
Member

Can you elaborate on the “without a major version bump” thing? Is that in case users are switching over it?

@andersio
Copy link
Member Author

andersio commented Jun 17, 2017

Yes, that was the reason @mdiep blocked the race strategy (#233) from merging into 1.1.x to be semver compliant.

Even if extensible versioned enum (note: library evolution) eventually lands in Swift, FlattenStrategy is meant to be consumed internally, so the opaqueness introduced here should not be an issue.

@NachoSoto
Copy link
Member

Cool then I’m on board after those 2 comments

@andersio andersio modified the milestone: 2.0 Jun 17, 2017
@mdiep
Copy link
Contributor

mdiep commented Jun 18, 2017

I'll review soon, but this is a great idea. 💯

@mdiep mdiep merged commit f6bb11f into master Jun 18, 2017
@mdiep mdiep deleted the flatten-strategy branch June 18, 2017 18:12
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.

4 participants