Fork me on GitHub

Is there anything wrong with my setup, or recomplilation of defmutation (server side) does not have immediate effect?


I have to also regenerate handler and parser


@slawek098 you probably want some kind of “reloaded” workflow. Look at the Fulcro template for a straightforward example of how to set this up with mount (although you can also use component or some variant if that’s your preference). Using this workflow, when I make a change I first reload the namespace (to make sure it compiles) then restart the system, by running (restart) at the REPL if you’re using the same setup as the Fulcro template. Also note that in Cursive or Emacs (and probably other editors) you can bind the reload command to a keyboard shortcut, so it’s really quick to do this as part of your normal development workflow.


@mdhaney I am using component, so (reset) fixes everything - but I am surprised that redefinition of function in runtime does not resolve the issue.


Yeah, I think there are a couple things going on there. I remember reading something about Ring and how handlers wouldn’t pick up changes without special steps being taken, and also something about the way Clojure deals with multimethods. TBH, I’ve been using the reloaded pattern so long, I’ve forgotten the details of some of the problems it was trying to solve. ☺️


A problem is if you pass a fn by value (the default) - changing the original fn's code then of course has no effect, that's why you typically give #'my-handler to ring. Mulrimethods, protocols etc are troublesome.


which reactjs widgets do you use with fulcro, folks ?


we also have some authorization/permission stuff mixed in there


that NS is used by JVM and nodeJS envs


the JVM one has the internal function trick so you can re-eval a mutation definition and have it take affect immediately