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

Fix info lookup #3047

Merged
merged 3 commits into from
Sep 9, 2021
Merged

Fix info lookup #3047

merged 3 commits into from
Sep 9, 2021

Conversation

plexus
Copy link
Contributor

@plexus plexus commented Sep 8, 2021

When doing a var-info lookup we potentially try three different strategies:
info, lookup, and eval. The second currently always fails, because the "info"
dict is not at the top level in the response message, but nested under an "info"
key.

Compare and contrast:

 (cider-sync-request:info "clojure.core/str")
 (cider-sync-request:lookup "clojure.core/str")
 (cider-fallback-eval:info "clojure.core/str")

Running tests locally I get a failure, but it seems unrelated.

cider-repls when multiple sessions exist always returns the most recently used connection

Traceback (most recent call last):
  buttercup-fail("%s" "Expected `(cider-repls)' to be `equal' to `(#<buffer *b-session:b2:cljs*(8228)> #<buffer *b-session:b1:clj*(7432)>)', but instead it was `(#<buffer *a-session:bb2:cljs*(8909)> #<buffer *a-session:bb1:clj*(4337)>)' which does not match because: (list-elt 0 (different-atoms #<buffer *a-session:bb2:cljs*(8909)> #<buffer *b-session:b2:cljs*(8228)>)).")
  signal(buttercup-failed "Expected `(cider-repls)' to be `equal' to `(#<buffer *b-session:b2:cljs*(8228)> #<buffer *b-session:b1:clj*(7432)>)', but instead it was `(#<buffer *a-session:bb2:cljs*(8909)> #<buffer *a-session:bb1:clj*(4337)>)' which does not match because: (list-elt 0 (different-atoms #<buffer *a-session:bb2:cljs*(8909)> #<buffer *b-session:b2:cljs*(8228)>)).")
FAILED: Expected `(cider-repls)' to be `equal' to `(#<buffer *b-session:b2:cljs*(8228)> #<buffer *b-session:b1:clj*(7432)>)', but instead it was `(#<buffer *a-session:bb2:cljs*(8909)> #<buffer *a-session:bb1:clj*(4337)>)' which does not match because: (list-elt 0 (different-atoms #<buffer *a-session:bb2:cljs*(8909)> #<buffer *b-session:b2:cljs*(8228)>)).

Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

Thanks!

If you're just starting out to hack on CIDER you might find this section of its
manual
extremely useful.

@bbatsov
Copy link
Member

bbatsov commented Sep 9, 2021

Looks good, but you will need to rebase.

When doing a var-info lookup we potentially try three different strategies:
info, lookup, and eval. The second currently always fails, because the "info"
dict is not at the top level in the response message, but nested under an "info"
key.
@plexus
Copy link
Contributor Author

plexus commented Sep 9, 2021

Rebased!

@plexus
Copy link
Contributor Author

plexus commented Sep 9, 2021

You'll notice I also fixed some more linter warnings that I was getting locally but not on CI. Maybe cause I'm on a more recent Emacs build? (I tend to build from master, last time was end of July).

@bbatsov bbatsov merged commit d8dd41e into clojure-emacs:master Sep 9, 2021
@bbatsov
Copy link
Member

bbatsov commented Sep 9, 2021

Thanks!

@plexus plexus deleted the fix-info-lookup branch September 9, 2021 14:10
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