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

checker: extend byte deprecation warnings to return types #19668

Merged
merged 1 commit into from Oct 29, 2023

checker: extend byte deprecation warnings to return types

1cde7b0
Select commit
Failed to load commit list.
Merged

checker: extend byte deprecation warnings to return types #19668

checker: extend byte deprecation warnings to return types
1cde7b0
Select commit
Failed to load commit list.
Deleted GitHub App / Copilot for PRs succeeded Oct 26, 2023 in 23s

Analysis complete

Summary

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.

Walkthrough

  • 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)

Poem

Oh we're the coders of the V-lang
And we like to keep our code in sync
So we heave away and we refactor
From byte to u8 in a blink

Emoji

🔀⚠️🛠️

Include these descriptions in your pull request description by including the following marker tags:

  • copilot:all: all the content, in one go
  • copilot:summary: a one paragraph summary of the code changes
  • copilot:walkthrough: a step by step walkthrough of the code changes
  • copilot:poem: a poem about the code changes!
  • copilot:emoji: three emoji that capture the changes

Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here].

Details

Copilot for PRs is a limited technical preview from GitHub Next.

It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.

To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord

Progress:

File Status Duration
Summary & Walkthrough ✅ Finished 21.5 seconds
vlib/builtin/string.v ✅ Finished 9.3 seconds
vlib/json/json_primitives.v ✅ Finished 8.2 seconds
vlib/v/checker/fn.v ✅ Finished 8.2 seconds