babashka / nbb

Scripting in Clojure on Node.js using SCI
Eclipse Public License 1.0
863 stars 52 forks source link

nbb no longer finds local namespaces after 1.0.140 #279

Closed aisamu closed 1 year ago

aisamu commented 1 year ago

Version

$> npm ls nbb
nbb@1.0.140

Also tested on 141 and 142 and the same happened.

Platform

$> uname -a
Darwin aisambp-stedi 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64 arm Darwin
$> npm --version && node --version
8.19.2
v18.12.1

Problem

nbb doesn't find local namespaces.

Reproduction

Project shape

;; ./test.cljs
(ns test
  (:require [foo.bar :as fb]))

(prn *file*)
(prn "TEST")
;; ./foo/bar.cljs
(ns foo.bar)

(prn *file*)
(prn "TEST2")

Results

< 1.0.140

$> npm i nbb@1.0.139 && nbb test.cljs

up to date, audited 310 packages in 2s

56 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
"/<path>/foo/bar.cljs"
"TEST2"
"<path>/test.cljs"
"TEST"

> 1.0.140=

$> npm i nbb@1.0.140 && nbb test.cljs

changed 1 package, and audited 310 packages in 502ms

56 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
----- Error --------------------------------------
Message:  Could not find namespace: foo.bar
Could not find namespace: foo.bar

Happy to provide further details/examples!

Thanks again for nbb!

borkdude commented 1 year ago

Should be fixed with 1.0.144 being pushed on CI now

aisamu commented 1 year ago

Whoa, that's fast! Thank you 🥳