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

Make printed structures slightly more readable #2910

Draft
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

thexa4
Copy link
Contributor

@thexa4 thexa4 commented Mar 27, 2021

Could be a possible solution for #2894

Example output with the same script as #2909:
image

@Dunbaratu
Copy link
Member

I'm not at my dev computer to test this right now, but can you increase the max depth a bit so the RGBA() and RANGE() values get printed out in the example script? They were in there to test the case of something that does have a ToString() defined but is also Serializable so it has Dump logic, to see if the Dump printout ends up overriding the ToString printout like it does with the current code. (i.e. the problem in the current implemention, prior to either PR, is that instead of seeing this as the value in the list:

RGBA(1, 0, 0, 0)

it showed this:

[8] = RGBA
["r"] = 1
["g"] = 0
["b"] = 0
["a"] = 0

(Which led to the strange effect that the 8th element when you print L2. looked nothing like what you get when you print L2[8]. directly. The latter was going through ToString() and the former was doing a more raw dump of fields.)

@thexa4
Copy link
Contributor Author

thexa4 commented Mar 27, 2021

Right, I did not add anything for this. Lets see what I can do

image

@thexa4
Copy link
Contributor Author

thexa4 commented Mar 27, 2021

Added support for summarizing an object in one line.

image

@Dunbaratu
Copy link
Member

Unrelated note - how are you running that in the VAB?

@thexa4
Copy link
Contributor Author

thexa4 commented Mar 28, 2021

Unrelated note - how are you running that in the VAB?

develop...thexa4:feature/ksc-mainframe (has quite a lot of changes and isn't well tested, didn't want to create a PR for it yet)

@thexa4
Copy link
Contributor Author

thexa4 commented Apr 18, 2021

TODO:

  • Refactor so that printing control flow is done locally, not in the formatters
  • Try to look at prefix annotations

@thexa4 thexa4 marked this pull request as draft June 15, 2021 19:32
@thexa4
Copy link
Contributor Author

thexa4 commented Jan 9, 2022

Initial implementation doesn't crash instantly, testing with it now.

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