Skip to content

Instantly share code, notes, and snippets.

@sjl
Created July 11, 2012 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sjl/3088120 to your computer and use it in GitHub Desktop.
Save sjl/3088120 to your computer and use it in GitHub Desktop.
wat
git clone git://github.com/sjl/caves/
cd caves

Start a REPL:

lein repl

It'll grab the deps and start fine. Cool. Close out of it.

Now edit the name of one of the methods in a protocol (and all the things that use it, of course):

sed -i '' -e 's/can-move/able-to-move/' src/caves/entities/aspects/mobile.clj src/caves/entities/player.clj

Now try the REPL again:

lein repl

You get this lovely little guy:

CompilerException java.lang.IllegalArgumentException: No single method: able_to_move_QMARK_ of interface: caves.entities.aspects.mobile.Mobile found for function: able-to-move? of protocol: Mobile, compiling:(caves/entities/player.clj:39)

Googling for that shows a Clojure bug about calling a protocol method with the wrong arity, which has nothing to do with whatever the hell is happening here.

Now flush everything:

lein clean

And try the REPL again:

lein repl

And it works.

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