Skip to content

Namespaces with * can't be found. #376

@commiterate

Description

@commiterate

version

v1.3.196

platform

macOS Sequoia 15.3.2

problem

Namespace symbols with * don't seem to work.

$ bb repl-clj
Clojure 1.12.0

user=> (require '[test-nbb-ns.test-cljc :as test-cljc])
nil

user=> (test-cljc/hello)
"Hello from test-nbb-ns.test-cljc!"
nil

user=> (require '[test-nbb-ns.*test-cljc* :as *test-cljc*])
nil

user=> (*test-cljc*/hello)
"Hello from test-nbb-ns.*test-cljc*!"
nil
$ bb repl-cljs
Welcome to nbb v1.3.196!

user=> (require '[test-nbb-ns.test-cljc :as test-cljc])
nil

user=> (test-cljc/hello)
"Hello from test-nbb-ns.test-cljc!"
nil

user=> (require '[test-nbb-ns.*test-cljc* :as *test-cljc*])
"Error: Could not find namespace: test-nbb-ns.*test-cljc*"

user=> (require '[test-nbb-ns.test-cljs :as test-cljs])
nil

user=> (test-cljs/hello)
"Hello from test-nbb-ns.test-cljs!"
nil

user=> (require '[test-nbb-ns.*test-cljs* :as *test-cljs*])
"Error: Could not find namespace: test-nbb-ns.*test-cljs*"

There may be other characters which are allowed in symbols that don't work, but I haven't tested those.

https://clojure.org/reference/reader#_symbols

repro

https://github.com/commiterate/test-nbb-ns

This is using :local/root "." in nbb.edn to defer to deps.edn.

The generated .nbb has files for all the namespaces.

.nbb
└── .cache
    └── 234d643b78573b567a783af269377ad0cd729227
        ├── deps.edn
        ├── nbb-deps
        │   ├── META-INF
        │   │   └── MANIFEST.MF
        │   └── test_nbb_ns
        │       ├── *test_cljc*.cljc
        │       ├── *test_cljs*.cljs
        │       ├── test_cljc.cljc
        │       └── test_cljs.cljs
        └── nbb-deps.jar

expected behavior

Namespaces with * work like in Clojure (Java).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions