Skip to content

debugger - removed ManagedByteArray & OptionalValue#2357

Merged
andrei-marinica merged 4 commits intorc/v0.66from
debug-trim
Apr 27, 2026
Merged

debugger - removed ManagedByteArray & OptionalValue#2357
andrei-marinica merged 4 commits intorc/v0.66from
debug-trim

Conversation

@andrei-marinica
Copy link
Copy Markdown
Contributor

@andrei-marinica andrei-marinica commented Apr 27, 2026

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 ManagedByteArray and OptionalValue.
  • Add an local-install.sh helper for copying the LLDB pretty-printer script into a VS Code-related location.
  • Update ManagedByteArray formatting traits and refresh the debugger test toolchain/dependency lockfile.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026

Contract comparison - from 4e6f7e0 to 6689b1c

Path                                                                                             size                  has-allocator                     has-format
esdt-transfer-with-fee.wasm 7502 false without message
factorial.wasm 579 false None
crypto-bubbles.wasm 2541 false None
order-book-factory.wasm 3401 false None
order-book-pair.wasm 14229 false None
adder.wasm 699 false None
fractional-nfts.wasm 8306 false without message
lottery.wasm 12843 false without message
multisig-full.wasm 15130 false without message
multisig-view.wasm 5590 false None
multisig.wasm 13442 false without message
crypto-zombies.wasm 9255 false without message
digital-cash.wasm 9845 false None
nft-minter.wasm 9725 false without message
nft-storage-prepay.wasm 2606 false None
kitty-ownership.wasm 12965 false without message
kitty-auction.wasm 9411 false without message
kitty-genetic-alg.wasm 3494 false without message
proxy-pause.wasm 4148 false None
nft-subscription.wasm 8840 false without message
ping-pong-egld.wasm 6397 false None
crowdfunding.wasm 3557 false None
empty.wasm 244 false None
bonding-curve-contract.wasm 14132 false None
token-release.wasm 6977 false without message
rewards-distribution.wasm 9605 false without message
seed-nft-minter.wasm 14443 false without message
check-pause.wasm 1260 false None
multiversx-price-aggregator-sc.wasm 17910 false without message
multiversx-wegld-swap-sc.wasm 4492 false None
std-contract.wasm 3469 true without message
vault.wasm 9035 false None
vault-upgrade.wasm 708 false None
recursive-caller.wasm 5163 false without message
forwarder-blind.wasm 14242 false without message
transfer-role-features.wasm 8667 false without message
proxy-test-second.wasm 2329 false without message
second-contract.wasm 1158 false None
first-contract.wasm 3433 false None
parent.wasm 1979 false None
child.wasm 3982 false without message
forwarder-legacy.wasm 33668 false without message
local-esdt-and-nft.wasm 12568 false without message
proxy-test-first.wasm 5719 false without message
mesh-node.wasm 16145 false without message
forwarder-raw.wasm 13193 false None
forwarder-raw-init-async-call.wasm 2357 false None
forwarder-raw-init-sync-call.wasm 2938 false None
forwarder.wasm 49178 false without message
builtin-func-features.wasm 3820 false None
panic-message-std.wasm 16074 false with message
panic-message-features.wasm 13036 false with message
abi-tester.wasm 8607 true without message
abi-tester-ev.wasm 760 false None
scenario-tester.wasm 1374 false None
forbidden-opcodes.wasm 842 false None
rust-testing-framework-tester.wasm 8608 false None
rust-snippets-generator-test.wasm 4710 false None
alloc-features.wasm 23267 false without message
alloc-mem-fail.wasm 17819 true without message
alloc-mem-leaking.wasm 23424 false without message
esdt-system-sc-mock.wasm 4623 false None
use-module.wasm 32741 false without message
use-module-view.wasm 736 false None
payable-features.wasm 5872 false None
exchange-features.wasm 1514 false None
big-float-features.wasm 6373 false without message
basic-features.wasm 87721 false without message
basic-features-small-int-bug.wasm 824 false None
basic-features-storage-bytes.wasm 541 false None
erc1155.wasm 12023 false without message
erc1155-marketplace.wasm 10602 false without message
erc20.wasm 1870 false None
erc721.wasm 2232 false None
erc1155-user-mock.wasm 1229 false None
crowdfunding-erc20.wasm 4910 false without message
lottery-erc20.wasm 12893 false without message
formatted-message-features.wasm 3600 false without message
multi-contract-features.wasm 681 false None
multi-contract-features-view.wasm 1113 false None
multi-contract-alt-impl.wasm 353 false None
multi-contract-example-feature.wasm 680 false None
send-tx-repeat.wasm 1292 false None
vec-repeat.wasm 4876 false None
linked-list-repeat.wasm 6842 false without message
set-repeat.wasm 6515 false None
map-repeat.wasm 7367 false without message
queue-repeat.wasm 5540 false None
single-value-repeat.wasm 4257 false None
str-repeat-mb-builder-basic.wasm 757 false None
str-repeat.wasm 2733 false without message
str-repeat-mb-builder-cached.wasm 1109 false without message
large-storage.wasm 1656 false None

⚠️ Could not download the report for the base branch. Displaying only the report for the current branch. ⚠️

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ManagedByteArray and OptionalValue.
  • Add an install.sh helper for copying the LLDB pretty-printer script into a VS Code-related location.
  • Update ManagedByteArray formatting 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() calls get_inner_type_handler(), which raises UnknownType if the inner type has no registered handler. With the ManagedByteArray handler 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 a ManagedByteArray handler (with a regex that matches the const generic) or catching/wrapping UnknownType here 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.

Comment thread tools/rust-debugger/pretty-printers/install.sh Outdated
@andrei-marinica andrei-marinica marked this pull request as ready for review April 27, 2026 14:13
@andrei-marinica andrei-marinica merged commit b070e99 into rc/v0.66 Apr 27, 2026
23 checks passed
@andrei-marinica andrei-marinica deleted the debug-trim branch April 27, 2026 14:14
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