maria icon indicating copy to clipboard operation
maria copied to clipboard

Add warning/error for unsuccessful `require`

Open pesterhazy opened this issue 7 years ago • 1 comments

When I evaluate (require '[reagent.core :as r]), the form returns nil, but the namespace cannot be accessed.

Requiring non-existing namespace like foo.bar also returns nil, and it doesn't throw an exception.

Are you planning to add support for 3rd party libraries like reagent?

pesterhazy avatar Jul 23 '17 11:07 pesterhazy

I agree, require should provide some better feedback if it is not possible to get the thing you asked for.

Are you planning to add support for 3rd party libraries like reagent?

Yes, lots of work is going into https://github.com/mhuebert/cljs-live to make this possible. We are currently only building bundles for the built-in Maria libraries and Clojure Spec, but since reagent recently landed support for the self-host compiler, we can look at that soon.

To see some require statements that do work now, you can open this gist: https://www.maria.cloud/gist/8d7dd5bb0294b9623af0bc7c607f46d2

(it's a small set of tests to ensure that the self-host environment is working as expected.)

mhuebert avatar Jul 23 '17 11:07 mhuebert