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

More detailed debug descriptions in show #20

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

tgymnich
Copy link
Contributor

@tgymnich tgymnich commented Mar 31, 2023

Use debugDescription instead of description for more detailed debug info, which matches the behavior of lldb po <obj>.

Example:

<MPSMatrix: 0x106b9a4b0>
        Rows:                   3
        Columns:                3
        Matrices:               1
        rowBytes:               12
        matrixBytes:    36

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.24 ⚠️

Comparison is base (c0c0d7f) 66.54% compared to head (58b26f4) 66.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   66.54%   66.30%   -0.24%     
==========================================
  Files           8        8              
  Lines         556      558       +2     
==========================================
  Hits          370      370              
- Misses        186      188       +2     
Impacted Files Coverage Δ
src/foundation.jl 72.27% <0.00%> (-1.47%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@maleadt
Copy link
Member

maleadt commented Apr 12, 2023

I'm not entirely sure we should be defaulting to the debug description all the time. How verbose can it get?
Maybe we should query the io's :compact property, i.e., get(io, :compact, false) ? obj.description : obj.debugDescription.

@tgymnich
Copy link
Contributor Author

tgymnich commented Apr 12, 2023

Done.
:compact does not seem to be set by default for the REPL.
In my experience it is often just the same as description, but can be quite useful for Metal MPSMatrix or MPSKernels. Which would only show <MPSMatrix: 0x106b9a4b0> right now, which is not terribly useful.

@maleadt
Copy link
Member

maleadt commented Apr 12, 2023

:compact does not seem to be set by default for the REPL.

Yeah, that's expected, so in most cases we should just be getting the verbose output.

@maleadt maleadt merged commit 110744b into JuliaInterop:master Apr 12, 2023
@tgymnich tgymnich deleted the debug-description branch July 25, 2023 10:22
@tgymnich
Copy link
Contributor Author

Could we at some point do a new release to make this usable?

@maleadt
Copy link
Member

maleadt commented Jul 25, 2023

Sure, I'll tag one.

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