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

Combine builders for Vector.build and Vector.new_builder #9922

Merged
merged 17 commits into from May 17, 2024

Conversation

GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented May 10, 2024

Pull Request Description

We have decided to keep the old new_builder, and to combine the new and old builders into one builder.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@GregoryTravis GregoryTravis marked this pull request as ready for review May 10, 2024 19:32
@GregoryTravis GregoryTravis added the CI: No changelog needed Do not require a changelog entry for this PR. label May 10, 2024
Comment on lines 1348 to 1349
If an uncaught dataflow error is appended with `append`, the dataflow
error is propagated, and it is not added to the builder.
Copy link
Member

Choose a reason for hiding this comment

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

Where is the error propagated? This is unclear to me.

Do you mean that the error will be propagated to the result of calling to_vector? Is the first such error propagated? Or last one?

Copy link
Member

Choose a reason for hiding this comment

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

Or looking at the code it seems that it is raised as a wrapped panic? That should be clarified by the docs. "Propagated" is far too vague here as it has several possible meanings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point -- my documentation was written for build and didn't cover new_builder. I updated it to cover both cases, and added similar tests for new_builder. I changed 'propagate' to 'throw' where 'propagate' is confusing.

Copy link
Member

@radeusgd radeusgd 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 that since we are keeping new_builder, we should have at least some tests of the error propagation, for example I think we should add a new_builder variant of the

group_builder.specify "Builder should propagate an uncaught dataflow error if it is appended with .append"

test

@GregoryTravis GregoryTravis added the CI: Clean build required CI runners will be cleaned before and after this PR is built. label May 13, 2024
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

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

I suggest to remove Vector.new_builder.

@GregoryTravis GregoryTravis added the CI: Ready to merge This PR is eligible for automatic merge label May 16, 2024
@mergify mergify bot merged commit 4d49b00 into develop May 17, 2024
36 checks passed
@mergify mergify bot deleted the wip/gmt/9824-one-builder branch May 17, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants