Skip to content

Conversation

@rokke-git
Copy link
Contributor

matrices use this alignment function to decide how wide rows are supposed to be, but the string elision requires the 3-argument show.

before:

julia> ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 0 0 0 0;0 0 0 0 0]
2×5 Matrix{Any}:
  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ⋯ 23 bytes ⋯ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  0  0  0  0
 0                                                                                         0  0  0  0

julia> ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 0 0;0 0 0]
2×3 Matrix{Any}:
  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ⋯ 33 bytes ⋯ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  …  0  0
 0                                                                                                      0  
0

after:

julia> ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 0 0 0 0;0 0
 0 0 0]
2×5 Matrix{Any}:
  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ⋯ 23 bytes ⋯ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  0  0  0  0
 0                                                                                  0  0  0  0

julia> ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 0 0 0 0;0 0 0 0 0]
2×5 Matrix{Any}:
  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ⋯ 98 bytes ⋯ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  0  0  0  0
 0                                                                                 0  0  0  0

@nsajko nsajko added arrays [a, r, r, a, y, s] display and printing Aesthetics and correctness of printed representations of objects. labels Jan 25, 2026
@nsajko

This comment was marked as resolved.

@rokke-git rokke-git changed the title Fix improper allignment of matrices with elided strings Fix improper alignment of matrices with elided strings Jan 25, 2026
@nsajko
Copy link
Member

nsajko commented Jan 25, 2026

Taking a quick look at CI, this PR breaks a bunch of (overly strict?) tests and doc tests.

@rokke-git
Copy link
Contributor Author

rokke-git commented Jan 25, 2026

oh, yup, does touch more than just strings...

julia> A = Array{Pair,0}(undef)

julia> [[A] 1;1 1] # before
2×2 Matrix{Any}:
  Array{Pair, 0}(UndefInitializer())  1
 1                                    1

julia> [[A] 1;1 1] # after
2×2 Matrix{Any}:
  Array{Pair, 0}(UndefInitializer())  1
 1                                     1

apparently undefined arrays work the opposite of strings; using the single-argument show.

should be an easy enough fix; just changing the method for strings instead of for everything

@rokke-git
Copy link
Contributor Author

now they both work:

julia> [[A] 1;1 1]
2×2 Matrix{Any}:
  Array{Pair, 0}(UndefInitializer())  1
 1                                    1

julia> ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 0 0 0 0;0 0 0 0 0]
2×5 Matrix{Any}:
  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  98 bytes  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"  0  0  0  0
 0                                                                                 0  0  0  0

@rokke-git
Copy link
Contributor Author

it looks like the test is finding some download error? I may be reading things wrong, but idk how this could affect (or effect, lol) that; maybe network was down when it ran or something?

@nsajko
Copy link
Member

nsajko commented Jan 26, 2026

Yeah, the CI here can be flaky. Most probably any download-related failure is not due to the changes in your PR.

@rokke-git
Copy link
Contributor Author

then is there anything else I should do to like re run it or something; or just wait for review?

@nsajko
Copy link
Member

nsajko commented Jan 26, 2026

If I were you I might try to force CI to restart by either merging with latest master or just pushing an empty commit to the PR branch.

@rokke-git rokke-git force-pushed the patch-1 branch 2 times, most recently from 94094f9 to 941ef46 Compare January 26, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrays [a, r, r, a, y, s] display and printing Aesthetics and correctness of printed representations of objects.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants