@cgrand what's the issue with quoting? I feel I'm lacking some context
my pain with quoting impl is due to a bad decoupling between print-on
and ednize
Quoting is about the fact that when I work on unrepl I do have #unrepl/xxx
as data and donโt want them handled by the client
@pesterhazy you see what I mean?
@cgrand, your edn printer needs to handle those "specials" in a special way?
which printer, the unrepl one?
yeah
I'm trying to summarize to see if I understand
Excert from unravel:
user=> [(tagged-literal โunrepl/... nil)]
[#__1]
I would expect [#unrepl/... nil]
but itโs a super niche issue affecting mostly me
ah
so the issue is you can't distinguish between "fake" unrepl defrecords (tagged literals) generated by client code and the genuine ones?
yup
that does seem like a niche issue ๐ def not a release blocker
@cgrand @pesterhazy question: do any of you have like a set of tests that you use to check border cases / printing /etc, when working on unravel? I have a file with a couple of things that I use to test everything is displaying correctly, but I'm sure there might be more interesting types of "tests"
this is what I have so far:
(+ 1 1)
{:a 1}
(def square #(* % %))
(square 5)
(list
(range 100)
(into [] (range 100))
(into #{} (range 100)))
(def letters (map char (range 97 (+ 97 26))))
(zipmap letters (range 20))
(zipmap letters (repeatedly #(range 100)))
(apply str (repeat 100 "a"))
(print "hi")
(println "hi")
(print (apply str (repeat 100 "a")))
(println (apply str (repeat 100 "a")))
(/ 1 0)
x
(future
(Thread/sleep 5000)
(println "delayed 5 secs"))
(I'm also testing objects, like printing functions, atoms, etc)
nice!
@volrath there's scripts/tests
ah, perfect ๐
it would be fantastic to add these as a further test case
maybe it'd be nice to have a collection of these expresions, so that we could use unrepl's output for them and test
haha yeah
don't judge me for my homegrown "unit testing" framework
more like end-to-end tests I guess
so I'm thinking maybe do a collection of this files with their corresponding unrepl edn outputs as edn files, and every client could use those edn files to reproduce entire repl sessions
have you seen this? https://github.com/Unrepl/unravel/blob/master/test/basic.ought.regex
hey, if it works.. I wonder, how do you use those?
what command do you run to test the regex?
scripts/tests
ok
for each "FILE" it sends "FILE.clj" to the repl and expects "FILE.ought" or "FILE.ought.regex"
well the list of files is currently hardcoded https://github.com/Unrepl/unravel/blob/master/scripts/test-runner#L45
but that can be easily turned into a glob
right
maybe EDN would be better but I just went with the simplest thing that worked
it's good
edn is easier to setup in something like travisci
I guess it's possible to run a repl in travis, but way slower
you mean, get nicer test output? as in JUnit?
this should work well on travis
just haven't gotten around to set up CI
i mean just automating it.. I haven't run any clojure tests con travis, I'm guessing they have images for that.. so it'd be just running a socket repl on the container, upgrading and sending the files
i thought edn because then you don't have to do any of that, it's faster, but it's not end-to-end
but now that i think about it, it's better to run the repl in every test
because that way you could also test your own blob customization, if any
the script already does some of this, like starting the clojure server in the bg: https://github.com/Unrepl/unravel/blob/master/scripts/tests#L6
On circle, we only need to install yarn and download the clojure jar - then I think it should be good to go
๐
hmm. can't figure out how to add circleci through the github org
figured it out ๐
@pesterhazy parfix ready to merge; --flag parfix
to try it
@volrath circle ci now passes: https://circleci.com/gh/Unrepl/unravel/10
cool, I'll probably do something similar for unrepl.el soon