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

Introduce the firstAndTail operator to the public API #3186

Merged
merged 13 commits into from
Feb 14, 2025

Conversation

mgodave
Copy link
Contributor

@mgodave mgodave commented Feb 5, 2025

We have found increasing cases where the splice operator can be used outside of the ST implementation and are therefore migrating it to the public API for general use. Instead of "splice" we are adopting "firstAndTail" as the public name.

Previously this operator parameterized different types for the first item and the remaining which, as a result, would attempt to perform a cast inside the operator for the first element. While migrating this operator, for general usage outside of the internal http packages, I have removed this cast and made the simplifying assumption that the head and the tail of the spliced stream are of the type of the input stream.

@mgodave mgodave changed the title Move the splice operator the public API [DRAFT] Move the splice operator the public API Feb 5, 2025
@mgodave mgodave changed the title [DRAFT] Move the splice operator the public API Migrate the splice operator the public API Feb 7, 2025
@mgodave mgodave marked this pull request as ready for review February 7, 2025 17:51
mgodave and others added 4 commits February 7, 2025 13:31
…rent/api/SubscribablePublisher.java

Co-authored-by: Bryce Anderson <bl_anderson@apple.com>
…rent/api/StacklessCancellationException.java

Co-authored-by: Bryce Anderson <bl_anderson@apple.com>
@mgodave mgodave changed the title Migrate the splice operator the public API Introduce the firstAndTail operator to the public API Feb 14, 2025
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

Minor nits, then LGTM:

Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

🚀

@mgodave mgodave merged commit 4f4b204 into apple:main Feb 14, 2025
11 checks passed
@mgodave mgodave deleted the drusek/splice-operator branch February 14, 2025 23:28
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.

3 participants