Fork me on GitHub
#clerk
<
2024-03-10
>
teodorlu12:03:35

Hi! Are there known Clerk issues with defprotocol, defrecord or “bare” namespaces? I’m hitting some errors, putting details in thread.

teodorlu12:03:13

“bare” namespace: I’m using :paths ["."] and a Clojure file in the same directory as the deps.edn file.

teodorlu12:03:33

This is the error I’m getting:

:clojure.error/cause
"No implementation of method: :sample of protocol: #'second-dice/Sample found for class: second_dice.Dice"

teodorlu12:03:55

screenshot attached.

teodorlu12:03:58

I’m unable to produce the same error by evaulating forms from the top to the bottom.

teodorlu12:03:40

A call to clerk/clear-cache! and a following call to clerk/show! seems to fix the error.

teodorlu12:03:48

I tried to isolate the error, assuming it was just the defprotocol or the defrecord. But I haven’t been say exactly what is causing the error. It seems to happen sometimes when I’m implementing my protocol for a new record.

teodorlu12:03:19

I currently have the REPL state that gave me the error open, so I could possibly provide more data. (not sure what kind of data is relevant)

teodorlu12:03:11

Clerk version: io.github.nextjournal/clerk {:mvn/version "0.15.957"}

mkvlr12:03:18

there’s https://github.com/nextjournal/clerk/issues/497 which could be related?

👀 1
teodorlu12:03:15

Sounds related.

teodorlu12:03:38

Want me to add the details i put in this thread into issue 497 as a comment?

mkvlr12:03:57

yes please

👍 1
mkvlr12:03:58

not surprised this isn’t working well yet, we haven’t spent a lot of time on this and it does need quite a bit of special handling

👍 1
mkvlr12:03:40

might be good to spend some time to at least document the pitfalls here

👍 1
teodorlu12:03:30

I would appreciate section in the book (or a doc somewhere else) on current limitations and (potential) workarounds a lot.

👍 2
teodorlu13:03:03

added a comment to the issue: https://github.com/nextjournal/clerk/issues/497#issuecomment-1987222271 I included the whole output from *cider-error*, which I didn’t paste into this thread (it’s big).

🙏 1
phronmophobic18:03:28

Is this related https://github.com/nextjournal/clerk/issues/455 ? I also ran into a similar issue recently with an error like "No implementation of method: of protocol"

👀 1