if "$pom"; then exec "$JAVA_CMD" -Xmx256m -classpath "$tools_cp" clojure.main -m clojure.tools.deps.alpha.script.generate-manifest --config-files "$config_str" --gen=pom "${tools_args[@]}" elif "$print_classpath"; then echo "$cp" elif "$describe"; then for config_path in "${config_paths[@]}"; do if [[ -f "$config_path" ]]; then path_vector="$path_vector\"$config_path\" " fi done cat <<-END {:version "1.9.0.381" :config-files [$path_vector] :install-dir "$install_dir" :config-dir "$config_dir" :cache-dir "$cache_dir" :force $force :repro $repro :resolve-aliases "$(join '' ${resolve_aliases[@]})" :classpath-aliases "$(join '' ${classpath_aliases[@]})" :jvm-aliases "$(join '' ${jvm_aliases[@]})" :main-aliases "$(join '' ${main_aliases[@]})" :all-aliases "$(join '' ${all_aliases[@]})"} END
As far as I can tell this means, if the .cpcache is stale (as in this case), make-classpath will always be run before handling the -Sdescribe parameter.
Reproduction steps
Delete your local
.m2
cacherm -rf ~/.m2/
Create a folder
cd
into the folder and make sure there is no.cpcache
folderrm -rf .cpcache
Create a deps.edn file with the following contents
{:deps {clj-time {:mvn/version "0.14.2"
}}}Run the command
clojure -Sdescribe
Expected Result
Just the environment and command parsing info as data e.g.
Actual Result
Notice that the dependencies have been resolved, as indicated by several jars being downloaded.
Possible reason for bug
I think the issue is in this part of the
clojure
script:which is followed by
As far as I can tell this means, if the
.cpcache
is stale (as in this case),make-classpath
will always be run before handling the -Sdescribe parameter.