technomancy / leiningen

Moved to Codeberg; this is a convenience mirror
https://codeberg.org/leiningen/leiningen
Other
7.29k stars 1.61k forks source link

Unable to start a REPL inside a project. #2774

Closed eynhcaysem closed 2 years ago

eynhcaysem commented 2 years ago

Initial debugging steps Before creating a report, especially around exceptions being thrown when running Leiningen, please check if the error still occurs after:

Describe the bug Lein repl doesn't start when inside a certain project. This project doesn't have any dependencies in project.clj other than the latest version of clojure (1.10.3). Without a project repl starts with no issues. Creating a new project and starting a repl there also works. This issue appeared seemingly out of nowhere: previously repl worked in this project.

To Reproduce Steps to reproduce the behavior:

  1. Go to a certain lein project
  2. Run the command lein repl
  3. See error

Actual behavior An exception is thrown and the process exits:

$ lein run Syntax error compiling at (/tmp/form-init11477894767259776810.clj:4341:33). Unable to resolve symbol: create in this context

Full report at: /tmp/clojure-4019537888258490872.edn Subprocess failed (exit code: 1)

Expected behavior A lein repl server should start.

Logs https://gist.github.com/eynhcaysem/7be82bb5479e1d34a96776b2e16a0c7b

Environment

technomancy commented 2 years ago

Steps to reproduce the behavior:

Go to a certain lein project Run the command lein repl See error

I think you might be a little confused about what "steps to reproduce" means.

In order for a bug report to be useful, it needs to contain enough information for other people to be able to see the bug.

eynhcaysem commented 2 years ago

Ah, yes, sorry, this is my first time opening an issue.

And it also seems like I opened it for no reason. I've tried to actually create a reproducible example and found out that somehow one letter was changed in the ns declaration in core.clj, which took me like two hours to spot. The stack trace didn't help as it didn't mention any of my code, so I initially assumed that it was a problem with Leiningen. My bad.

technomancy commented 2 years ago

np; glad you got it working. The error messages Clojure gives are certainly frustrating sometimes.