-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
[inspector] Fix exception thrown when inspecting short Eduction #170
Conversation
c2b4f35
to
a2cab51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
src/orchard/inspect.clj
Outdated
;; reached the end of the collection, so it's not infinite. | ||
(empty? (drop (* (inc current-page) page-size) obj)) current-page | ||
;; possibly infinite | ||
:else Integer/MAX_VALUE)) cat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cat
? 🐱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless use of cat! https://porkmail.org/era/unix/award
(testing "renders the header section" | ||
(is (match? '("Class" | ||
": " | ||
(:value "clojure.core.Eduction" 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth playing with inspect/next-page
as other tests do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its interaction with paging is weird right now (pager shows like it's paged but it's not, it just shows Java fields). See my comment below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, fixed that weird interaction too since it was ugly.
This is a band-aid to prevent an exception thrown (and overall a fix that makes the underlying code more correct). Whether an Eduction should be rendered in the current way or differently can be discussed separately. |
c850fac
to
2240d36
Compare
Tests are failing on Clojure master Besides from that, all lgtm, if you want to expand the tests you are on time since I'll create an unrelated PR tomorrow, so it will get all in the same release train. |
Hmm, looks like a flaky test to me, I don't think I changed anything that could trigger that case. |
2240d36
to
0c21f43
Compare
See, passed without changes:) |
0c21f43
to
615f61a
Compare
🍻! With a bit of luck we'll have new orchard/cider-nrepl today/tomorrow |
🌳 🌳 🌳 🌳 🌳 |
Because
Eduction
type implementsclojure.lang.Sequential
but notclojure.lang.Counted
, the inspector threw an exception when trying to inspect it. A minor but annoying bug. Besides, there could be other similar classes out there, so it's worth fixing.Before submitting a PR make sure the following things have been done:
Thanks!