debugger - removed ManagedByteArray & OptionalValue#2357
Merged
andrei-marinica merged 4 commits intorc/v0.66from Apr 27, 2026
Merged
debugger - removed ManagedByteArray & OptionalValue#2357andrei-marinica merged 4 commits intorc/v0.66from
andrei-marinica merged 4 commits intorc/v0.66from
Conversation
|
Contract comparison - from 4e6f7e0 to 6689b1c
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Rust debugger tooling and related tests/workflows, primarily by simplifying LLDB pretty-printer coverage (removing ManagedByteArray and OptionalValue) and aligning the debugger test harness with newer SDK/toolchain versions.
Changes:
- Remove LLDB pretty-printer handlers (and corresponding format-tests) for
ManagedByteArrayandOptionalValue. - Add an
install.shhelper for copying the LLDB pretty-printer script into a VS Code-related location. - Update
ManagedByteArrayformatting traits and refresh the debugger test toolchain/dependency lockfile.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/rust-debugger/pretty-printers/multiversx_sc_lldb_pretty_printers.py | Removes ManagedByteArray / OptionalValue handler registrations and implementations from LLDB summaries. |
| tools/rust-debugger/pretty-printers/install.sh | Adds a small installer script to copy the pretty-printer script into $HOME/.vscode/extensions. |
| tools/rust-debugger/format-tests/src/format_tests.rs | Removes format-test cases that asserted summaries for ManagedByteArray and OptionalValue. |
| tools/rust-debugger/format-tests/Cargo.lock | Updates the debugger format-tests dependency lockfile (likely from a toolchain/dependency refresh). |
| framework/base/src/types/managed/wrapped/managed_byte_array.rs | Adds SCDisplay and SCBinary impls for ManagedByteArray by delegating to the inner ManagedBuffer. |
| .github/workflows/lldb-formatter-tests.yml | Bumps the Rust toolchain used by LLDB formatter tests to 1.95. |
Comments suppressed due to low confidence (1)
tools/rust-debugger/pretty-printers/multiversx_sc_lldb_pretty_printers.py:454
ManagedOption.summary_from_raw_handle()callsget_inner_type_handler(), which raisesUnknownTypeif the inner type has no registered handler. With theManagedByteArrayhandler removed in this PR,ManagedOption<..., ManagedByteArray<...>>will now throw an uncaught exception (this override isn't wrapped in@check_invalid_handle) and can break LLDB summaries. Consider either reintroducing aManagedByteArrayhandler (with a regex that matches the const generic) or catching/wrappingUnknownTypehere to fall back to a safe summary string.
class ManagedOption(PlainManagedVecItem, ManagedType):
def summary_from_raw_handle(
self, raw_handle: int, context: lldb.value, type_info: lldb.SBType
) -> str:
if raw_handle == MANAGED_OPTION_NONE_HANDLE:
return "ManagedOption::none()"
inner_type_handler, inner_type = get_inner_type_handler(
type_info, MANAGED_OPTION_INNER_TYPE_INDEX
)
assert isinstance(inner_type_handler, ManagedType)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request overview
This PR updates the Rust debugger tooling and related tests/workflows, primarily by simplifying LLDB pretty-printer coverage (removing
ManagedByteArrayandOptionalValue) and aligning the debugger test harness with newer SDK/toolchain versions.Changes:
ManagedByteArrayandOptionalValue.local-install.shhelper for copying the LLDB pretty-printer script into a VS Code-related location.ManagedByteArrayformatting traits and refresh the debugger test toolchain/dependency lockfile.