JuliaInterop / ObjectiveC.jl

Objective-C embedded in Julia
Other
39 stars 10 forks source link

More detailed debug descriptions in show #20

Closed tgymnich closed 1 year ago

tgymnich commented 1 year ago

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[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.24 :warning:

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

Additional details and impacted files ```diff @@ 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](https://codecov.io/gh/JuliaInterop/ObjectiveC.jl/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaInterop) | Coverage Δ | | |---|---|---| | [src/foundation.jl](https://codecov.io/gh/JuliaInterop/ObjectiveC.jl/pull/20?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaInterop#diff-c3JjL2ZvdW5kYXRpb24uamw=) | `72.27% <0.00%> (-1.47%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaInterop). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaInterop)

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

maleadt commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

: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.

tgymnich commented 11 months ago

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

maleadt commented 11 months ago

Sure, I'll tag one.