diff --git a/CHANGELOG.md b/CHANGELOG.md index 8418ed5..2471a72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ Changelog clj has both stable and prerelease versions. Current and former stable build are listed in **bold** and are (or were) available from the default [brew formula](https://github.com/clojure/brew-install/). Other versions can be obtained using versioned formulas only. -Prerelease versions: none +Prerelease versions: + +* next + * TDEPS-70 - Detect missing jar in classpath and recompute **Current stable version:** diff --git a/src/main/resources/clojure/install/clojure b/src/main/resources/clojure/install/clojure index bb442a4..3fe6267 100755 --- a/src/main/resources/clojure/install/clojure +++ b/src/main/resources/clojure/install/clojure @@ -355,12 +355,24 @@ if "$force" || "$trace" || "$tree" || "$prep" || [ ! -f "$cp_file" ]; then elif [[ -n "$tool_name" ]] && [ "$config_dir/tools/$tool_name.edn" -nt "$cp_file" ]; then stale=true else + # Are deps.edn files stale? for config_path in "${config_paths[@]}"; do if [ "$config_path" -nt "$cp_file" ]; then stale=true break fi done + + # Are .jar files in classpath missing? + IFS=':'; read -ra cp_entries <<<"$(cat $cp_file)" + for cp_entry in "${cp_entries[@]}"; do + if [[ "$cp_entry" == *.jar && ! -f "$cp_entry" ]]; then + stale=true + break + fi + done + + # Are manifest files in local/git deps stale? if [[ "$stale" = false && -f "$manifest_file" ]]; then set +e IFS=$'\n' read -ra manifest_files -d '' <"$manifest_file"