Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

empty map causes proto-repl to not pretty print value #315

Open
chriswatrous opened this issue Jan 4, 2019 · 0 comments
Open

empty map causes proto-repl to not pretty print value #315

chriswatrous opened this issue Jan 4, 2019 · 0 comments

Comments

@chriswatrous
Copy link

If I have a value like this:

{:cached nil,
 :request-time 129,
 :repeatable? false,
 :protocol-version {:name "HTTP", :major 1, :minor 1},
 :streaming? true,
 :http-client [org.apache.http.impl.client.InternalHttpClient
               1099947407
               "org.apache.http.impl.client.InternalHttpClient@418fdd8f"],
 :chunked? false,
 :reason-phrase "OK",
 :headers {"Access-Control-Allow-Origin" "*",
           "Via" "1.1 vegur",
           "Date" "Fri, 04 Jan 2019 01:24:34 GMT",
           "Access-Control-Allow-Credentials" "true",
           "Content-Length" "429",
           "Server" "gunicorn/19.9.0",
           "Content-Type" "application/json",
           "Connection" "close"},
 :orig-content-encoding nil,
 :status 200,
 :length 429,
 :body {:slideshow {:date "date of publication",
                    :slides [{:type "all",
                              :title "Wake up to WonderWidgets!"}
                             {:type "all",
                              :title "Overview",
                              :items ["Why <em>WonderWidgets</em> are great"
                                      "Who <em>buys</em> WonderWidgets"]}],
                    :title "Sample Slide Show",
                    :author "Yours Truly"}},
 :trace-redirects []}

it is nicely pretty printed. This was copied from the repl output.

If I put an empty map {} anywhere in the structure, as a key or value in a map, or as a vector item, it prints all on one line:

{:cached nil, :request-time 129, :repeatable? false, :protocol-version {:name "HTTP", :major 1, :minor 1}, :streaming? true, :http-client [org.apache.http.impl.client.InternalHttpClient 1099947407 "org.apache.http.impl.client.InternalHttpClient@418fdd8f"], :chunked? false, :reason-phrase "OK", :headers {"Access-Control-Allow-Origin" "*", "Via" "1.1 vegur", "Date" "Fri, 04 Jan 2019 01:24:34 GMT", "Access-Control-Allow-Credentials" "true", "Content-Length" "429", "Server" "gunicorn/19.9.0", "Content-Type" "application/json", "Connection" "close"}, :orig-content-encoding nil, :status 200, :length 429, :body {:slideshow {:date "date of publication", :slides [{:type "all", :a {}, :title "Wake up to WonderWidgets!"} {:type "all", :title "Overview", :items ["Why <em>WonderWidgets</em> are great" "Who <em>buys</em> WonderWidgets"]}], :title "Sample Slide Show", :author "Yours Truly"}}, :trace-redirects []}

I haven't seen this behavior with any other value but empty map.

bash> apm -v
apm  2.1.2
npm  6.2.0
node 8.9.3 x64
atom 1.33.1
python 2.7.14
git 2.16.2

macOS 10.14.2
proto-repl 1.4.24

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant