Skip to content

checker: extend byte deprecation warnings to return types - #19668

Merged
spytheman merged 1 commit into
vlang:masterfrom
ttytm:checker/fn-return-byte-dep-warn
Oct 29, 2023
Merged

spytheman merged 1 commit into
vlang:masterfrom
ttytm:checker/fn-return-byte-dep-warn

Conversation

@ttytm

@ttytm ttytm commented Oct 26, 2023 •

Copy link
Copy Markdown
Member

πŸ€– Generated by Copilot at 1cde7b0

Refactored string and json modules to use u8 instead of byte and added a deprecation warning for byte. This is part of a transition to remove the byte alias and use u8 consistently.

πŸ€– Generated by Copilot at 1cde7b0

  • Change the return type of string.at from byte to u8 and move the unsafe block inside the return statement (link, link)
  • Move decode_byte from vlib/json/json_primitives.v to vlib/builtin/string.v and use u8 instead of byte (link)
  • Add a warning to the checker for using byte instead of u8 (link)

Comment thread vlib/v/checker/fn.v

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good work.

@spytheman
spytheman merged commit 1e578b1 into vlang:master Oct 29, 2023
@ttytm
ttytm deleted the checker/fn-return-byte-dep-warn branch November 1, 2023 19:47
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.

2 participants