Skip to content

Commit

Permalink
TDEPS-70 Detect missing jar in classpath and recompute
Browse files Browse the repository at this point in the history
  • Loading branch information
puredanger committed Oct 21, 2022
1 parent 8e3b6a6 commit f791abf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Expand Up @@ -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:**

Expand Down
12 changes: 12 additions & 0 deletions src/main/resources/clojure/install/clojure
Expand Up @@ -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"
Expand Down

0 comments on commit f791abf

Please sign in to comment.