Clojure REPL does not accept changes made to defrecord

I have a leiningen project. In one of the clojure source files, I defined some entries. My workflow is usually starting emacs and connecting to REPL. As soon as I connect to the REPL, I go to the appropriate namespace and Cc Ck file, so I can start working with REPL and the code in the file. However, if I make changes to the entries of this file and Cc Ck, REPL does not pick up the changes.

So, every time I need to make changes to a record, I have to stop the lein swank process, restart it and reconnect to it from emacs. It is aging very fast. What am I missing? I tried Cc Cl instead of Cc Ck, but this does not work. I tried to remove the 'class' directory in the root of the project, but this also does not work.

I would be grateful for any ideas or recommendations.

Also, as an aside, I always work in the namespace where the entries are defined.

Edit: I am actually modifying the protocol implementation in defrecord. Once I changed it and compiled it using Cc Ck and created a new entry in REPL, REPL still uses the old protocol implementation.

+5
source share
1 answer

I could use an example, but maybe you are changing the definition of records and looking at instances of some records that were made before the change?

repl, defrecord, repl, , , .

, , (use :reload-all ... all the namespaces in my project ...), , ..

+4

All Articles