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

DO NOT MERGE update Str.fromUtf8 error type #7321

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shua
Copy link
Contributor

@shua shua commented Dec 8, 2024

The intent here is to change the error type of Str.fromUtf8 to be a little more scrutible. To that end, the unnamed arguments have been replaced with a record with problem and index field that hopefully makes it a little clearer.

fixes #1020

@shua shua marked this pull request as draft December 8, 2024 22:12
@shua shua marked this pull request as ready for review December 9, 2024 19:17
Copy link
Contributor

@bhansconnect bhansconnect left a comment

Choose a reason for hiding this comment

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

That's a really nice gain for something so simple!

@bhansconnect
Copy link
Contributor

@Anton-4 any release management changes we need to do for a more fundamental type change to a builtin? This is likely to break some code, but for a really good reason.

@Anton-4
Copy link
Collaborator

Anton-4 commented Dec 10, 2024

Thanks for pinging me @bhansconnect, we should hold this for a bit so we can get the breaking changes for this in together with roc-lang/basic-cli#257 for the next basic-cli release.

@Anton-4 Anton-4 changed the title update Str.fromUtf8 error type DO NOT MERGE update Str.fromUtf8 error type Dec 10, 2024
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.

Make Str.fromUtf8 return a record
3 participants