Skip to content

Confusing project.clj syntax error #742

Description

@paddymul

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions