FreeBSD keeps installed ports and packages in unix system resource directories like e.g. /usr/local/openjdk21. Deps.edn warns that these paths are deprecated when I include e.g. javafx. Will this be kept as a warning or are there plans to actually refuse use of unix system resources?
Can you share the error and your deps.edn?
The warning is WARNING: Use of :paths external to the project has been deprecated, please remove:
I believe from here:
https://github.com/clojure/tools.deps/blob/6014860529dcd0f5b31907c67c307b2555ee80d1/src/main/clojure/clojure/tools/deps.clj#L563
The warning does not reliably appear on every start, but at least when I think it is gone 😉
{:paths ["src/main" "resources" "classes"]
:deps {org.clojure/clojure {:mvn/version "1.12.0"}
nrepl/nrepl {:mvn/version "1.3.1"}
cider/cider-nrepl {:mvn/version "0.53.2"}
nrepl/bencode {:mvn/version "1.2.0"}
com.fulcrologic/fulcro {:mvn/version "3.8.3"}
com.fulcrologic/fulcro-websockets {:mvn/version "3.4.0"}
com.fulcrologic/guardrails {:mvn/version "1.2.9"}
com.taoensso/sente {:mvn/version "1.20.0"}
com.taoensso/timbre {:mvn/version "6.6.1"}
com.taoensso/tufte {:mvn/version "2.6.3"}}
:aliases
{... many aliases ...
:flow-storm-ui
{:extra-deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.3.0"}}
:jvm-opts ["-Dflowstorm.fileEditorCommand=emacsclient -n +<<LINE>>:0 <<FILE>>"
"-Dflowstorm.jarEditorCommand=emacsclient --eval '(let ((b (cider-find-file \"jar:file:<<JAR>>!/<<FILE>>\"))) (with-current-buffer b (switch-to-buffer b) (goto-char (point-min)) (forward-line (1- <<LINE>>))))'"]
:extra-paths ["/usr/local/openjfx14/lib/javafx.base.jar"
"/usr/local/openjfx14/lib/javafx.graphics.jar"
"/usr/local/openjfx14/lib/javafx.controls.jar"
"/usr/local/openjfx14/lib/javafx.web.jar"]}
... more aliases ...}}
Should I refer to unix system recources somewhere else or in a different way?I sometimes start via shadow-cljs, sometimes via clj and have not payed enough attention to reliably tell when it shows up and when it does not. I saw it twice yesterday but so far not today.
Is there some way to use an alias in another one? I swear I read about something similar to this where the :test alias can reuse the deps from :some-feature.
{
:aliases {:some-feature {:extra-deps {,,,}}
:test [:some-feature {:extra-deps {,,,}}]}
}:paths is the only thing that can use aliases-as-data I believe.
Tools and programs running from the CLI can programmatically get the basis and manipulate data from aliases as needed (after the classpath etc has been setup by the CLI).
You can always provide multiple aliases on the command line (or programmatically inside your tool/program using tools.deps as a library).
right, yeah I'll add the aliases to bb.edn. At least I wasn't totally imagining it. Maybe it would be good to mention that in the docs here? https://clojure.org/reference/deps_edn#aliases
https://clojure.org/reference/deps_edn#paths talks about it (and is the only entry in deps.edn that mentions using aliases as data within the CLI):
Paths are declared in a top level key :paths and are a collection of string paths or alias names. Alias names refer to a collection of paths defined in an alias (this can be done for reuse).
And the aliases section says:
Aliases give a name to a data structure that can be used either by the Clojure CLI itself or other consumers of deps.edn.
At the top of that page it says:
Tools can access alias data via the basis at runtime, or programatically via tools.deps.
If you have a specific suggestion for improvements, you could write up an http://ask.clojure.org question about it.