Fork me on GitHub
#joker
<
2019-12-02
>
Zoltan Kalmar10:12:26

I have that latest joker on MacOS (installed via brew)

Zoltan Kalmar10:12:38

$ cat h.joke 
(ns hu.evernode.test
  "Hiccup test" 
  (:use [joker.hiccup]))

(println (html [:span {:class "foo"} "bar"]))

Zoltan Kalmar10:12:54

$ joker --lint h.joke 
h.joke:5:11: Parse error: Unable to resolve symbol: html

Zoltan Kalmar10:12:18

however it works

Zoltan Kalmar10:12:31

$ joker h.joke 
<span class="foo">bar</span>

Zoltan Kalmar10:12:05

$ joker -v
v0.14.0

Zoltan Kalmar10:12:23

should I file an issue on github?

jcburley13:12:38

Quoting from the README.md at https://github.com/candid82/joker:

If you use :refer :all Joker won't be able to properly resolve symbols because it doesn't know what vars are declared in the required namespace (i.e. clojure.test). There are generally three options here:
Since :use is similar to :refer :all, the advice pertains. Check out the three options listed in that file.

Zoltan Kalmar14:12:13

oh, i forgot that. Thanks!

👍 4
hlship18:12:07

When using ns-sources, why do you map a string for the namespace, rather than a symbol? Seems odd. Also, feels odd to put the ns-sources before the ns call, rather than inside it, ala :require, etc.

hlship18:12:52

ANN: net.lewisship.multi v1.0.0 net.lewisship.multi is a complement to joker.tools.cli that allows a single tool, a Joker script, to contain multiple commands, each with its own command line options and arguments. https://github.com/hlship/multi

👍 4
hlship19:12:16

I think the ns-sources mechanism is promising, but I think it could be a bit easier; for instance, a special case for libraries that are available from github; maybe

(ns-sources {"net.lewisship.multi" {:github "hlship/multi" :version "v1.0.0"}})
would expand to

jvtrigueros20:12:45

Woah! That ns-sources looks awesome! > {:github "hlship/multi" :version "v1.0.0"} :version here is a ref/tag?

hlship21:12:00

That was just a strawman; right now only :url is supported, not :github. Maybe :tag would be more be more accurate than :version?

Charles18:12:06

Yeah I thought :tag / :sha would be good options for the github interface

👍 4
Charles18:12:55

I had originally gone down that route, only to realize that it was challenging at best (I couldn't find a suitable solution) to get to private repos

Charles11:12:28

I had debated how much to do in go vs joker, but maybe there's a path where the ns-sources could be extended through a multimethod so you could support external libs from any number of foreign source