@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
@runjorel has joined the channel
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
I've followed the instructions on the github readme
clj --help
Version: 1.10.1.754@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"}}}
}This is what I am running: clojure -X:new create :name sandbox/oscad-sandbox
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.just to see if qualifying the call would do anything
Is there a deps.edn file in directory where you are running this command?
no
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.
lol, yea 😄
(I'm running CLI 1.10.1.763 but there's almost no differences -- and nothing that would affect that)
Alright, i'll keep tracking down what I am doing wrong.
And given the day/hour thank you so much for your help!
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?
I'd be surprised if I do as I am working on a fresh machine
regardless, I edited the deps.edn in the .config folder and now everything is working as expected
I didn't know about -Sdescribe!
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.
Yes, that XDG_CONFIG_HOME is set to that location.
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"
fiAh! Nice! That's actually very thoughtful
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 facepalm
So on that note, good night 😄
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 🙂