How do I specify dependencies from repl.it?
Found a work around.
First you can't name any other file .clj if you want to see the output of the main.clj when you hit run. You can use files with no extensions. So core.clj would be just core and if you put the file in a folder, (ex. "proj/"), also leave no extension in the filename. Using
(ns proj.core) will work fine.
Second, use load-file in the main.clj .
(load-file "proj/core") before calling
(require 'proj.core) or before using
(ns main (:require [proj.core :refer :all]))
That should be enough to call dependencies from files you wrote or created that are not in the version of clojure being used.
Last pro-tip, if you want to build while testing, simply build the file in whatever folder and file structure, load it, require it, and run-test definitions for the ns or from the main.clj
(load-file "proj/core_test") (require 'clojure.test) (clojure.test/run-tests 'proj.core_test)
Yea... it seems to be a bug or overlooked component. It might also be that since main is executed and the repl is loaded, any dependencies that are outside of the clojure version running can't be loaded, but it also prevents files created adjacent in the project from being used as dependencies