> :exclude is not a valid option here (it's not having any effect). (doc 
> require) mentions only :as and :refer as valid options in the libspec. 
> :exclude is an option for :refer and :refer-clojure, not for :require.
> 
> It's maybe interesting that the spec for ns does not report this problem here 
> in :clojure.core.specs/prefix-list because of the use of keys*, which takes 
> an open map view of options. I'll have to check with Rich if this is 
> something we want to lock down more.

I see.  Thanks.  If I wanted to pull in everything but e*, for example, I could 
use :exclude, but there's no reason to exclude anything if I'm only using 
specific, namespace-qualified functions from clojure.core.matrix.

I had noticed that the docstring for require didn't mention exclude, but with 
some of the more complex macros and functions like require, there are sometimes 
minor points missing from docstrings.  (That's not a complaint.)

I don't need :exclude at present, but I still can't figure out how I could pull 
in all functions but one from a namespace.  For example, the Clojurescript 
compiler doesn't like this:

(ns free.matrix-arithmetic
  (:require [clojure.core.matrix :as mx :refer :all :exclude [e*]]))

The spec failure report:

clojure.lang.ExceptionInfo: Only :as, :refer and :rename options supported in 
:require / :require-macros; offending spec: [clojure.core.matrix :refer :all 
:exclude [e*]] ...

Similarly, this

(ns free.matrix-arithmetic
  (:use [clojure.core.matrix :exclude [e*]]))

results in this

clojure.lang.ExceptionInfo: Only [lib.ns :only (names)] and optionally `:rename 
{from to}` specs supported in :use / :use-macros; offending spec: 
[clojure.core.matrix :exclude [e*]] ...

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to