1.7.0-alpha3 breakage due to symbol conflicts

Description

I've been trying to build core.matrix with 1.7.0-alpha3 and I get a failures due to symbol conflicts with clojure.core (specifically the new update function).

1 2 3 4 5 6 7 8 java.lang.IllegalStateException: update already refers to: #'clojure.core.matrix.utils/update in namespace: clojure.core.matrix.impl.ndarray-magic at clojure.lang.Namespace.warnOrFailOnReplace(Namespace.java:88) at clojure.lang.Namespace.reference(Namespace.java:110) at clojure.lang.Namespace.refer(Namespace.java:168) at clojure.core$refer.doInvoke(core.clj:4071) at clojure.lang.RestFn.invoke(RestFn.java:439) at clojure.core.matrix.impl.ndarray_magic$eval9762$loading__5295__auto____9763.invoke(ndarray_magic.clj:1) at clojure.core.matrix.impl.ndarray_magic$eval9762.invoke(ndarray_magic.clj:1)

Simpler case to reproduce:

1 2 3 4 (ns foo) (def inc dec) ;; gets a warning (ns bar (:require [foo :refer :all])) ;; gets another warning (ns bar (:require [foo :refer :all])) ;; causes the exception (effectively a ns reload)

Cause: In the case of a load, foo/inc is replacing clojure.core/inc and that causes the expected warning. In the case of a reload, clojure.core/inc is replacing foo/inc - this case is not currently handled and falls into the error case.

Approach: In the case of clojure.core/inc replacing foo/inc (should only happen during a reload), ignore and issue neither warning or error.

Patch: 0001-CLJ-1578-don-t-throw-when-a-core-Var-replaces-anothe.patch

Screened by: Alex Miller

Environment

None

Status

Assignee

Unassigned

Reporter

Mike Anderson

Labels

None

Approval

Ok

Patch

Code

Fix versions

Affects versions

Release 1.7

Priority

Critical
Configure