This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-19
Channels
- # adventofcode (150)
- # aleph (15)
- # announcements (1)
- # beginners (52)
- # cider (3)
- # clj-kondo (2)
- # cljsrn (2)
- # clojure (49)
- # clojure-chicago (1)
- # clojure-europe (13)
- # clojure-france (20)
- # clojure-spec (3)
- # clojure-uk (1)
- # clojurescript (16)
- # community-development (3)
- # core-matrix (1)
- # cursive (9)
- # defnpodcast (1)
- # deps-new (43)
- # fulcro (68)
- # graphql (1)
- # malli (7)
- # off-topic (25)
- # portal (4)
- # re-frame (15)
- # reagent (7)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (8)
- # shadow-cljs (4)
- # vim (22)
Hi all. i have a fresh install of clj tool and clj-new but I am getting this error Unqualified function can't be resolved: create
@runjorel What exact command are you running and how are any aliases you're using defined?
in my ~/.clojure/deps.edn is this (and only this)
{
:aliases
{:new {:extra-deps {seancorfield/clj-new
{:mvn/version "1.1.228"}}
:ns-default clj-new
:exec-args {:template "app"}}}
}
I also tried this:
clojure -X:new clj-new/create :name sandbox/oscad_sandbox
Execution error (FileNotFoundException) at clojure.run.exec/requiring-resolve' (exec.clj:31).
Could not locate clj_new__init.class, clj_new.clj or clj_new.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
Is there a deps.edn
file in directory where you are running this command?
I am also running this in Java 11
java --version
openjdk 11.0.7 2020-04-14 LTS
OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)
Dont know if that makes a differenceI just copied your ~/.clojure/deps.edn
file over mine, and ran that command in an empty folder and it worked fine.
seanc@DESKTOP-30ICA76:~/clojure$ cat > ~/.clojure/deps.edn
{
:aliases
{:new {:extra-deps {seancorfield/clj-new
{:mvn/version "1.1.228"}}
:ns-default clj-new
:exec-args {:template "app"}}}
}
seanc@DESKTOP-30ICA76:~/clojure$ clojure -X:new create :name sandbox/oscad-sandbox
Generating a project called oscad-sandbox based on the 'app' template.
seanc@DESKTOP-30ICA76:~/clojure$ rm -rf oscad-sandbox/
seanc@DESKTOP-30ICA76:~/clojure$ clojure -X:new clj-new/create :name sandbox/oscad-sandbox
Generating a project called oscad-sandbox based on the 'app' template.
seanc@DESKTOP-30ICA76:~/clojure$
@runjorel I can't reproduce your problem.
(I'm running CLI 1.10.1.763 but there's almost no differences -- and nothing that would affect that)
Oh, it's early here... I'm going to be online for hours 🙂
Out of curiosity, what does clojure -Sdescribe
show (in full)?
clojure -Sdescribe
{:version "1.10.1.763"
:config-files ["/usr/local/lib/clojure/deps.edn" "/home/thefluxlife/.config/clojure/deps.edn" ]
:config-user "/home/thefluxlife/.config/clojure/deps.edn"
:config-project "deps.edn"
:install-dir "/usr/local/lib/clojure"
:config-dir "/home/thefluxlife/.config/clojure"
:cache-dir "/home/thefluxlife/.config/clojure/.cpcache"
:force false
:repro false
:main-aliases ""
:repl-aliases ""}
oooo wait a darn minute. I have not been editing .config/clojure/deps.edn
. I created my own .clojure/deps.edn
That says your "dot-clojure" file is /home/thefluxlife/.config/clojure/deps.edn
Maybe you have the CLJ_CONFIG
environment variable set?
regardless, I edited the deps.edn in the .config folder and now everything is working as expected
This is also on a linux-enabled Chromebook. I thought it would just be stock-debian but maybe there are some other customizations I dont know about.
Interesting. I suspect if you ask in #tools-deps someone will know why your user-level deps.edn
file is in .config/clojure
instead of .clojure
Ah, check XDG_CONFIG
-- I think that's it.
In clojure
it has this:
# Determine user config directory
if [[ -n "$CLJ_CONFIG" ]]; then
config_dir="$CLJ_CONFIG"
elif [[ -n "$XDG_CONFIG_HOME" ]]; then
config_dir="$XDG_CONFIG_HOME/clojure"
else
config_dir="$HOME/.clojure"
fi
Well not only have you helped with the task at hand but helped me learn a thing or 2 🙂. Thank you sir and I hope you have an awesome morning/day.
I run Ubuntu and it has XDG_DATA_DIRS
but not XDG_CONFIG
but I'm not any sort of expert on Linux distros 🙂
You're only two hours ahead of me 🙂
Oh my goodness, I thought you said something about the morning earlier in the backscroll. Clearly I am the one who needs rest
I've updated most of my repos to note that the user deps.edn
can be in ~/.clojure/
or ~/.config/clojure/
-- hopefully that will help future users 🙂
@seancorfield Debian Linux sets environment variable XDG_CONFIG_HOME
to $HOME/.config
and over-rides the default location of the user level config, e.g. $HOME/.config/.clojure
I added this to the Practicalli deps.edn config after a Debian user raised the same issue a few weeks ago. Sorry, I should have mentioned it to you at that time.
@jr0cket I opened an issue on your repo because I didn't see that mentioned in the README. It is mentioned in the CLI/deps reference but it's very much "in passing" and not when ~/.clojure/deps.edn
is first mentioned 😐
I'll remove the location in the first paragraph of the practicalli/clojure-deps-edn . Then the alternative location is mentioned clearly when the location is discussed https://github.com/practicalli/clojure-deps-edn#install-practicalli-clojure-deps-edn