trying to get leiningen user profile to run clojur

2019-07-06 23:51发布

I have both clojure-1.4.0 and clojure-1.5.0 installed and working correctly. In my various project.clj files, I can set one or the other as a dependency, and leiningen picks up the stated version correctly. When I am not in a project directory, then lein repl always runs clojure-1.4.0. I tried to change the default by putting the following profiles.clj in my ~/.lein directory:

{:user {:dependencies ^:replace [[org.clojure/clojure "1.5.0"]]
        :plugins                [[lein-pprint "1.1.1"]]}}

but lein repl, when not in a project directory, still runs clojure-1.4.0, with a seemingly incorrect error message if I happen to run lein repl while in the ~/.lein directory:

WARNING: user-level profile defined in project files.

I know that none of my project.clj files have a user profile in them since the following command prints nothing

find ~ -name project.clj -exec grep ":user" "{}" ';' -print 2> /dev/null

I know that leiningen is reading my profiles.clj file, since if I put an intentional syntax error in the file, I get an expected compiler exception.

I've read lein help profiles but can't quite figure out what I'm doing wrong.

hints, please & thanks?

0条回答
登录 后发表回答