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

Confusing project.clj syntax error #742

Open
paddymul opened this issue Jan 5, 2020 · 0 comments
Open

Confusing project.clj syntax error #742

paddymul opened this issue Jan 5, 2020 · 0 comments

Comments

@paddymul
Copy link

paddymul commented Jan 5, 2020

I am new to figwheel and clojurescript. I started from https://github.com/reagent-project/reagent-template . I have been trying to configure cider with emacs. While following those instructions I added the line :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]} to my project.clj. .

This caused the following syntax error when running lein fighweel

(base)  ~/code/reag-play  [master] $ ~/bin/lein 
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
java.lang.Exception: Error loading /Users/paddy/code/reag-play/project.clj

snip

Caused by: clojure.lang.Compiler$CompilerException: Syntax error reading source at (/Users/paddy/code/reag-play/project.clj:115:37).
#:clojure.error{:phase :read-source, :line 115, :column 37, :source "/Users/paddy/code/reag-play/project.clj"}
 at clojure.lang.Compiler.load (Compiler.java:7642)

Eventually I figured out that this error was caused by an existing :repl-options declaration in the same block. Once I figured out that I was redeclaring :repl-options it was easy to fix the problem. The syntax error stack trace was not helpful at all.

I would have expected an error describing the duplicate key.

I'm not sure about the suggested fix. Maybe an explicit instruction to look out for this case on fighweel NRepl instructions

I could also see the case that this is a bug with Leiningen.

Keep up the good work on Figwheel.

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

No branches or pull requests

1 participant