1
votes

I have a library that has multiple namespaces. I would like if I could make functions in all namespaces available in the core namespace. This way I could just require example.core instead of requiring example.ns1, example.ns2, etc.

Here is what I have in my core namespace

(ns example.core
  (:require [example.options :refer :all]
            [example.playback :refer :all]
            [example.controlls :refer :all]
            [example.stored :refer :all]
            [example.db :refer :all]))

here is how i'm trying to require it

(ns test-app.core
  (:require [example.core :as e])

(e/foo) ; where foo is defined in one of the namespaces required by example.core

When I try to execute that I get CompilerException java.lang.RuntimeException: No such var: e/foo

Is what I'm after possible? or will I have to import the multiple namespaces individually?

Thanks for your time

1

1 Answers

3
votes

You can do this using import-vars from the library Potemkin.