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

Support more types in dump #233

Open
0kenx opened this issue Apr 7, 2024 · 5 comments
Open

Support more types in dump #233

0kenx opened this issue Apr 7, 2024 · 5 comments
Labels
feature: builtins Builtin functions feature: dump Debugging with dump (__tact_debug) kind: language feature Intent to add a language feature

Comments

@0kenx
Copy link
Contributor

0kenx commented Apr 7, 2024

Currently, debug's dump() supports String, Int, and Bool. It doesn't support dumping Address, Cell, Slice etc.

To enhance developer experience it makes sense for dump to support all native data types.

@anton-trunov anton-trunov added the kind: language feature Intent to add a language feature label Apr 8, 2024
@anton-trunov
Copy link
Member

Address is supported since PR #175, will be released in v1.3.0

@novusnota
Copy link
Member

Address is supported since PR #175, will be released in v1.3.0

Which makes all native data types supported in dump() function. Soon-to-be documented

@anton-trunov anton-trunov added the feature: builtins Builtin functions label Apr 16, 2024
@Gusarich
Copy link
Member

I think we can implement formatted recursive dumping for cells and slices, the same way as csr. from Fift works.

@Gusarich Gusarich self-assigned this Apr 19, 2024
@Gusarich
Copy link
Member

I think we can implement formatted recursive dumping for cells and slices, the same way as csr. from Fift works.

While trying to implement this feature, I've came to a problem: STRDUMP doesn't allow printing of a string longer than 127 symbols because it only takes data from the current slice which is limited by 1023 bits.
So the implementation will break if cells have more than 508 bits (even less with the indentation).

So I think there's no good way to implement beautiful Cell and Slice dumping at the moment. However, if something like DUMPSLICE is ever introduced in TVM we'll add it to Tact's dump function.

@Gusarich Gusarich closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2024
@anton-trunov anton-trunov reopened this Apr 21, 2024
@anton-trunov
Copy link
Member

Let's keep this as a reminder

@Gusarich Gusarich removed their assignment May 9, 2024
@anton-trunov anton-trunov added the feature: dump Debugging with dump (__tact_debug) label Jun 12, 2024
@verytactical verytactical changed the title Debug's dump should support more data types Support more types in dump Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: builtins Builtin functions feature: dump Debugging with dump (__tact_debug) kind: language feature Intent to add a language feature
Projects
None yet
Development

No branches or pull requests

4 participants