Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no applicable method for the generic function on ClozureCL when *PRINT-PRETTY* is T #84

Open
svetlyak40wt opened this issue Oct 2, 2024 · 3 comments

Comments

@svetlyak40wt
Copy link
Contributor

Here is a minimal example how to reproduce the problem:

(let ((*print-pretty* t))
  (yason:with-output-to-string* ()
    (yason:encode 0)))

Tested on CCL 1.12.1.

This code signals the error:

> Error: There is no applicable method for the generic function:
>          #<STANDARD-GENERIC-FUNCTION STREAM-LINE-COLUMN #x30200006F29F>
>        when called with arguments:
>          (#<YASON::JSON-OUTPUT-STREAM #x30200180229D>)

See also the similar issue:
joaotavora/fiasco#28
and it's fix: joaotavora/fiasco@0cc08e7

@svetlyak40wt
Copy link
Contributor Author

I've found there is a solution for CMUCL:

https://github.com/phmarek/yason/blob/master/encode.lisp#L500-L502

And if I enable it for CCL, like this:

#+(or cmucl ccl)
(defmethod trivial-gray-streams:stream-line-column ((stream json-output-stream))
  nil)

then the problem goes away!

@phmarek
Copy link
Owner

phmarek commented Oct 8, 2024

Would you be so kind as to provide a pull request, preferably with a test (unless there's already one)?

Thank you.

@svetlyak40wt
Copy link
Contributor Author

Here is pull-request: #85

But it would be nice to rebuild the documentation there, because I've added a section on how to run tests for Yason.

Buy the way, if you would like. I can setup a github action to run tests on multiple CL implementations using my tool https://40ants.com/ci/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants