Skip to content

fix for issue #45066: honoring IOContext for showing Array type name#45277

Closed
ghost wants to merge 2 commits intomasterfrom
unknown repository
Closed

fix for issue #45066: honoring IOContext for showing Array type name#45277
ghost wants to merge 2 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented May 11, 2022

No description provided.

@oscardssmith
Copy link
Copy Markdown
Member

Other than a minor style nit, looks good!

@oscardssmith oscardssmith added the display and printing Aesthetics and correctness of printed representations of objects. label May 11, 2022
@ghost
Copy link
Copy Markdown
Author

ghost commented May 11, 2022

Thanks, I have added the style fix.

@oscardssmith oscardssmith added the merge me PR is reviewed. Merge when all tests are passing label May 11, 2022
@KristofferC
Copy link
Copy Markdown
Member

It would also be good to add a test that checks that the new printing works ok. Just comment if you need help how to do that.

@ghost
Copy link
Copy Markdown
Author

ghost commented May 12, 2022

Thanks, I would need a little help on how to write test to check this functionality. If you could point me to some resources it would be great! Thanks again.

@vtjnash
Copy link
Copy Markdown
Member

vtjnash commented May 27, 2022

What this should fix is the printing of this example:

julia> sprint(show, Base.Dict[], context=(:compact=>false, :module=>nothing))
"Base.Dict[]"

So, what would be good is adding an @test call somewhere such as test/show.jl that makes sure that prints exactly like that (and isn't missing the Base. part)

@vtjnash vtjnash added needs tests Unit tests are required for this change forgetmenot and removed merge me PR is reviewed. Merge when all tests are passing labels Jun 2, 2022
@rfourquet rfourquet changed the title fix for issue #45066: honring IOContext for showing Array type name fix for issue #45066: honoring IOContext for showing Array type name Sep 21, 2022
@kshyatt
Copy link
Copy Markdown
Member

kshyatt commented Oct 5, 2022

Marked "forget me not" yet seemingly forgotten... 😭

@ghost ghost closed this by deleting the head repository Nov 15, 2022
@vmpyr
Copy link
Copy Markdown
Contributor

vmpyr commented Jan 31, 2023

Hi @vtjnash!
I've tried writing the test you've mentioned. I placed it in test/strings/io.jl since the function sprint is defined in base/strings/io.jl. I hope its alright. Please review the same!

@DilumAluthge
Copy link
Copy Markdown
Member

Am I correct in saying that this PR is no longer necessary now that the following two PRs have been merged?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

display and printing Aesthetics and correctness of printed representations of objects. needs tests Unit tests are required for this change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants