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

add guidelines for choosing panics or error results #6958

Merged
merged 5 commits into from
Jan 13, 2025
Merged

Conversation

jp0317
Copy link
Contributor

@jp0317 jp0317 commented Jan 9, 2025

Which issue does this PR close?

Closes #6737

Rationale for this change

Add guidelines as per discussed in #6737

What changes are included in this PR?

guidelines

Are there any user-facing changes?

n/a

@tustvold
Copy link
Contributor

tustvold commented Jan 9, 2025

I wonder if there is some way to work this comment into this #6737 (comment)

I think it articulates something very important, that simply blindly changing panics to results is not desirable

@jp0317
Copy link
Contributor Author

jp0317 commented Jan 9, 2025

I wonder if there is some way to work this comment into this #6737 (comment)

I think it articulates something very important, that simply blindly changing panics to results is not desirable

Thanks for the comment! Added a note to emphasize that it's about reporting invalidity of user input as error results which does not necessarily replaces panic/assert for sanity checks, PTAL!

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @jp0317 🙏 -- I think this is better than what we have on main (nothing!) and reflects the consensus of #6737 so could be merged in.

I left a wording suggestion but we can also consider that change as a follow on PR as well in my opinion

README.md Outdated Show resolved Hide resolved
@alamb alamb added development-process Related to development process of arrow-rs documentation Improvements or additions to documentation labels Jan 10, 2025
@alamb alamb mentioned this pull request Jan 10, 2025
@jp0317
Copy link
Contributor Author

jp0317 commented Jan 10, 2025

Thanks for the reviews! Updated as suggested, PTAL.

@jp0317 jp0317 requested review from alamb and westonpace January 10, 2025 23:19
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks good to me -- thanks again @jp0317

@tustvold tustvold merged commit 3b31ff6 into apache:main Jan 13, 2025
9 checks passed
svencowart pushed a commit to elastiflow/arrow-rs that referenced this pull request Jan 14, 2025
* add guidelines for choosing panics or error results

* add note to clarify that checking invalidity of user input is the key point

* apply reviewer suggestions

Co-authored-by: Andrew Lamb <[email protected]>

* remove redundant word

* fix markdown format

---------

Co-authored-by: jp0317 <[email protected]>
Co-authored-by: Andrew Lamb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development-process Related to development process of arrow-rs documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid panics?
4 participants