Home > Back-end >  Clojure IntelliJ Repl can't reload files properly
Clojure IntelliJ Repl can't reload files properly

Time:02-03

First, thank you for take your time reading my question!

The problem is that when I try to start my system, the repl can't find some files, but if I go and load manually, each of this file's dependencies one by one before it, the file loads perfectly.

Example of manual loading: Example of manual loading

The commands I'm trying to execute:

(clojure.tools.namespace.repl/refresh)

Getting this error:

       :via [{:type clojure.lang.Compiler$CompilerException,
              :message "Syntax error compiling at (purchase_listinator/adapters/db/purchase_category.clj:1:1).",
              :data #:clojure.error{:phase :compile-syntax-check,
                                    :line 1,
                                    :column 1,
                                    :source "purchase_listinator/adapters/db/purchase_category.clj"}

I also tried this one:

(do (require '[com.stuartsierra.component.repl :as crepl])
    (require 'purchase-listinator.core)
    (crepl/reset))

Getting this error:

Syntax error compiling at (purchase_listinator\core.clj:1:1).
namespace 'purchase-listinator.components.pedestal' not found after loading '/purchase_listinator/components/pedestal'

Repository at the moment of this error for future reference

I have no idea what is happening, actually, I've been working on this project for many time and it was working well until this week.

I tried to research, but I had no success, it should be a simple thing that I'm missing, but I can't see it. I would be glad if you help me with this. Thank you so much in advance :)

CodePudding user response:

(Maybe)Removing the .idea folder and reopen the project helps.

CodePudding user response:

First, the problem is not related to the repository itself.

I have no idea what is happening, but I just clone the repository in another folder and I tried to start the system again, and guess what? It worked...

Probably there is a strange thing happening in my local folder, but I don't know what :/

Thank you so much!

  • Related