I'm currently working through "Clojure Data Analysis Cookbook" by Eric Rochester and have encountered an issue with namespace conflicts involving the abs function. I set up my project using Leiningen and included dependencies for incanter (version 1.9.3). However, when I try to require the incanter.core and incanter.io namespaces in my REPL, I get a series of warnings about the abs function being redefined.
Here's what I did:
Created a new project with
lein new data-eric
.Added Incanter dependencies to
project.clj
:[incanter/incanter-core "1.9.3"] [incanter/incanter-io "1.9.3"]
Started a REPL in VS Code command + shift + P: Start a Project REPL and Connect -> Leiningen
and ran the following commands:
(require '[incanter.core :as ic]
'[incanter.io :as io])
This resulted in multiple warnings, all related to the abs function being redefined in various namespaces, such as clojure.core.matrix.impl.mathsops, clojure.core.matrix.protocols, and incanter.core.
Example Warning:
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix.impl.mathsops, being replaced by: #'clojure.core.matrix.impl.mathsops/abs
I understand that this is due to the abs function existing in multiple namespaces, but I'm unsure about the best way to handle these warnings. Should I be concerned about these warnings affecting the functionality of my project? Is there a recommended approach to resolve or work around this issue?
Any guidance or suggestions would be greatly appreciated. Thank you in advance!
abs
was added toclojure.core
more recently than that library was updated: github.com/clojure/clojure/blob/…