-
Notifications
You must be signed in to change notification settings - Fork 11.4k
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
[move][move-compiler][errors] Add error codes to clever errors #21426
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. The main thing is seeing if we can remove the legacy_error_bitset
and if error_bitset
can just be used everywhere.
// Copyright (c) The Move Contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
const BITSET_VALUE_UNAVAILABLE: u16 = u16::MAX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm not grokking, but I'm confused why we need to keep this around, and why we can't just use the new bitset logic in error_bitset.rs
?
pub mod files; | ||
pub mod interactive; | ||
pub(crate) mod legacy_error_bitset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a code
for the error is set the behavior can diverge, but otherwise it should be the same between the two no? In which case we should be able to get rid of legacy_error_bitset
entirely
external-crates/move/crates/move-compiler/src/typing/translate.rs
Outdated
Show resolved
Hide resolved
external-crates/move/crates/move-compiler/src/typing/translate.rs
Outdated
Show resolved
Hide resolved
external-crates/move/crates/move-compiler/src/typing/translate.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 for doing this!
Co-authored-by: Tim Zakian <2895723+tzakian@users.noreply.github.com>
655d187
to
7311d2d
Compare
Description
This revises clever errors to include an error code, plus swaps them to
packed_struct
.Test plan
Tests versus legacy error codes, updated error code sin transational tests, and additional testing in the sui crate.
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.