joker

Discuss all things joker, the Clojure interpreter/linter on top of Go. https://github.com/candid82/joker
hlship 2019-11-09T00:24:42.053300Z

So I'm trying to create a joker.markup namespace for generating XML/HTML markup using Hiccup syntax. My new markup.joke includes a require of joker.html and that's failing:

16:17:09 ~/workspaces/golang/src/github.com/candid82/joker > ./run.sh --version && go install
<joker.markup>:5:5: Exception: No namespace: joker.html
Stacktrace:
  global <joker.markup>:1:1
  core/require <joker.core>:3483:3
  core/apply <joker.core>:527:4
  core/apply__ <joker.core>:3400:9
  core/apply <joker.core>:527:4
  core/apply__ <joker.core>:3353:5
  core/with-bindings* <joker.core>:1406:7
  core/apply <joker.core>:525:4
  core/apply__ <joker.core>:3380:9
  core/apply <joker.core>:527:4
  core/apply__ <joker.core>:2400:40
  core/ex-info <joker.core>:190:35
panic: <file>:0:0: Eval error: <joker.markup>:5:5: Exception: No namespace: joker.html
Stacktrace:
  global <joker.markup>:1:1
  core/require <joker.core>:3483:3
  core/apply <joker.core>:527:4
  core/apply__ <joker.core>:3400:9
  core/apply <joker.core>:527:4
  core/apply__ <joker.core>:3353:5
  core/with-bindings* <joker.core>:1406:7
  core/apply <joker.core>:525:4
  core/apply__ <joker.core>:3380:9
  core/apply <joker.core>:527:4
  core/apply__ <joker.core>:2400:40
  core/ex-info <joker.core>:190:35

goroutine 1 [running]:
<http://github.com/candid82/joker/core.PanicOnErr(0x3647268|github.com/candid82/joker/core.PanicOnErr(0x3647268>, 0xc00091b040)
        /Users/hlship/workspaces/golang/src/github.com/candid82/joker/core/eval.go:440 +0x6a
main.main()
        /Users/hlship/workspaces/golang/src/github.com/candid82/joker/core/gen_data/gen_data.go:96 +0x61d
exit status 2
core/object.go:1: running "go": exit status 1
Is there a way around this? My guess is that since std/html.joke is a built-in namespace there's an issue with having a dependency to it during generate stage?

Candid 2019-11-09T18:35:56.053500Z

html package is not imported in gen_data. You'd have to add _ "<http://github.com/candid82/joker/std/html|github.com/candid82/joker/std/html>" here https://github.com/candid82/joker/blob/master/core/gen_data/gen_data.go#L10 to make it work

hlship 2019-11-09T18:41:59.053800Z

Darn it! I just figured this out 30 seconds ago!

jcburley 2019-11-10T04:37:24.054Z

Hope this is helpful going forward: https://github.com/candid82/joker/pull/292

hlship 2019-11-12T00:57:11.066300Z

That was helpful, though I blundered through most of it over the weekend.

😀 1