specviz
                                
                                 specviz copied to clipboard
                                
                                    specviz copied to clipboard
                            
                            
                            
                        Generates ugly SVG instead of pretty PNG
Hi, I'd love to use this. But when I do as instructed in the README, I get some ugly SVG file rather than one of those great looking PNG file checked in with the repo. Here's a screenshot:

Ideally I'd like a good looking SVG, or dotfile that produces a good result when used with graphviz from the command line. But I tried that as well, and the result (when using the dotfile output without lines numbers) looks fairly similar:

Any idea what the issue could be? Thanks
@matthiasn Hmm, if you got the same output when using the dotfile w/ dot command line, then I'm not sure. What is it specifically that you don't like?
Well, mostly that it's not the same information. In the PNG there are more than twice as many arrows, showing where something is used. Here, these connections are omitted.
I see the same exact behavior, any updates on how to get the pretty png? I'd love to have something that looks like the example png instead of the screenshots posted above:
 Instead of
 Instead of 
Same for me too, using Clojure 1.9.0. I think specviz doesn't understand s/keys anymore?
Same for me, if that helps.
I started playing with some versions, and realized with deps like this:
  :dependencies [
                 [org.clojure/clojure "1.9.0-alpha12"]
                 [specviz "0.2.1"]
and the readme code like below I could generate a png file that looked nice:
(println "writting specviz example...")
(require '[specviz.core :as specviz] )
(specviz/diagram 'specviz.example nil "foo")
Not sure what exactly changed yet.
Same here, unfortunately. Newest specviz, Clojure 1.10. I tried @joefromct 's version, but I need to be using Clojure 1.10, and with that I get an error trying to require specviz.core from 0.2.1.
Has anyone found a good alternative in the meantime?
@eggsyntax can you try pasting your results for the command below, with i minimal reproducible error:
lein deps :tree
(assuming you are using lein)
Maybe there is a suggested exclusion we can use...
You mean using Clojure 1.10 & specviz 0.2.1, ie the conditions under which I get the error? With 1.10 and 0.2.3 I don't get any errors, I just get the same not-very-useful output that was originally reported in this issue.
Oh, yeah, I see I don't get that error on a fresh project with 1.10 and 0.2.1, interesting. The error I'm getting is
core> (require '[specviz.core :as specviz])
Syntax error (FileNotFoundException) compiling at (specviz/core.clj:1:1).
Could not locate clojure/spec__init.class, clojure/spec.clj or clojure/spec.cljc on classpath.
No suggestions from lein deps :tree, though, it just lists my dependencies (there aren't many):
[EDIT: cut out many of the dependencies & still the same error, changing the deps tree to match:]
[12:30] dw-domain-specs> lein deps :tree
 [clojure-complete "0.2.5" :exclusions [[org.clojure/clojure]]]
 [nrepl "0.6.0" :exclusions [[org.clojure/clojure]]]
 [org.clojure/clojure "1.10.1"]
   [org.clojure/core.specs.alpha "0.2.44"]
   [org.clojure/spec.alpha "0.2.176"]
 [org.clojure/tools.logging "0.5.0" :scope "test"]
 [specviz "0.2.1"]
   [hiccup "1.0.5"]
   [org.clojure/test.check "0.9.0"]
[EDIT2: I've got to give up on it, at least for now]
I don't think this has been fixed in 2021. Please let me know if anyone has got more things to try. Thank you for the project, that .png looks very good!
@eggsyntax have you ever found an alternative?
The problem seems to be that spec->graphviz-elements* dispatches on 'clojure.spec/... keys while in recent years the namespace has moved to clojure.spec.alpha/....
I am attempting a quick fix
I got something working and fixed the defmethods but unfortunately my example has got a lot of s/merge so I think I will park this for now - please let me know if there is any interest in a PR of what I have got