Fork me on GitHub
#nbb
<
2022-07-29
>
sirwobin13:07:11

within my nbb programme, how can I inspect the classpath?

borkdude13:07:59

@sirwobin

(ns foo (:require [nbb.classpath]))
(nbb.classpath/get-classpath)

👍 1
sirwobin14:07:14

What does #error {:message "Could not resolve symbol: schema", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase "analysis"}} mean? Context: I've forked plumatic schema, patched some files, started nbb in the src/cljc directory then run (require [schema.core :as s :include-macros true])

borkdude14:07:47

You need to quote the expression in require

sirwobin14:07:30

(require '[schema.core :as s :include-macros true]) produces #error {:message \"Could not resolve symbol: demunge\", :data {:type :sci/error, :line nil, :column nil, :file \"C:\\\\Users\\\\Robin\\\\IdeaProjects\\\\ss\\\\schema\\\\src\\\\cljc\\\\schema\\\\utils.cljc\", :phase \"analysis\"}} which is just as puzzling

borkdude14:07:37

Still need to add that to nbb. PR welcome

borkdude14:07:51

Or maybe it's good to add directly in SCI

borkdude14:07:14

But note that demunge is only available in CLJS in cljs.core, not in clojure.core on the JVM

sirwobin14:07:21

nbb is a cljs runtime so other cljs libs may use it in the future.

sirwobin14:07:50

I'm not familiar with the nb codebase. What role does SCI lib perform?

borkdude14:07:03

It's the interpreter that evaluates the code

sirwobin14:07:18

got it. I'm going to try another reader conditional in schema before attempting an nbb PR 🙂

sirwobin14:07:19

thanks for the pointer!

borkdude14:07:37

it might be good to locally compile nbb + a local checkout of SCI so you can change things faster

borkdude20:07:14

0.7.131 released with :deps support in nbb.edn ! Thanks @lilactown https://github.com/babashka/nbb/blob/main/CHANGELOG.md#07131

clojure-spin 4
👏 1
🔥 2
borkdude20:07:23

Note: this relies on #babashka being installed

1