Fork me on GitHub
#nbb
<
2022-08-11
>
Aron07:08:34

been trying to understand namespaces and file structures for 8 years and I am still unable to create a directory structure that works

1
Aron07:08:13

ok, figured it out eventually, reading the docs twice and starting over more than twice

Aron09:08:48

seems like if I have a file in root dir and require another, that way I can resolve a different file in a different directory in root, but if I just launch nrepl and try to eval, it can't resolve it (I am assuming because it's not in the same directory)

borkdude09:08:03

you have to launch the nrepl within the same directory as your project

Aron09:08:00

ashnur ~/r/o/t/nimble-tt ~1 -3 ?4 main ↑1,  ↓1                                                                                                                        last: 0m 2s 09:41:55
 ➜ npx nbb nrepl-server
nREPL server started on port 38007 on host 127.0.0.1 - 
Unhandled operation :ls-sessions
Unhandled operation :ls-sessions
Unhandled operation :ls-sessions

Aron09:08:22

ashnur ~/r/o/t/nimble-tt ~1 -3 ?4 main ↑1,  ↓1                                                                                                                        last: 0m 0s 10:07:57
 ➜ tree -L 2 -I node_modules
.
├── package.json
├── package-lock.json
├── README
├── src
│   └── main.cljs
├── test
│   └── output.cljs
└── test.cljs

Aron09:08:40

trying to evaluate something in output.cljs that refers to main.cljs

borkdude09:08:35

Right, you have to add src and test to nbb's classpath:

--classpath .:src:test