Silence common byte-compile warnings on MELPA install#3901
Merged
Conversation
The file uses nrepl-make-eval-handler, nrepl-dbind-response, and nrepl-dict-get directly but was relying on a transitive require chain through cider-client -> cider-session -> nrepl-client. The byte compiler doesn't always trace transitive requires, leading to "function not known to be defined" warnings on installs where the chain wasn't resolved at compile time.
server.el (the built-in Emacs server) defines server-buffer as a defvar, so any function or lambda taking server-buffer as a lexical argument shadows it within that scope. The byte compiler warns about this because dynamic-variable shadowing is a frequent source of subtle bugs. Rename to server-buf to sidestep the conflict.
End users compiling CIDER from MELPA see "docstring wider than 80 characters" warnings because the byte compiler defaults to a 80-col limit (the project's Eldev sets it to 100 internally, which masked these locally). Reword or wrap the offending lines so they're clean for end users too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A few warnings show up when end users install the latest CIDER from MELPA. Most are real source-side issues that we masked locally because
Eldevsetsbyte-compile-docstring-max-columnto 100 and pre-loads files before compiling them.Three commits, one issue each:
nrepl-client/nrepl-dictrequires incider-eval.el. It was relying on a transitive chain throughcider-client → cider-session → nrepl-client, which the byte compiler doesn't always follow, leading to "function not known to be defined" warnings fornrepl-make-eval-handleretc.server-bufferparameter (one defun + four lambdas incider.el) toserver-buf, sinceserver-bufferis adefvarin built-inserver.eland the lexical binding shadows it.eldev test) — 547 specs, 0 failedeldev compile --warnings-as-errors, and also clean when re-run with the strictbyte-compile-docstring-max-column 80