Run of fresh-releases for libdynapath-clojure

Try this locally (using silver-platter):

debian-svp new-upstream libdynapath-clojure 

Merge these changes:

git pull https://janitor.debian.net/git/libdynapath-clojure fresh-releases/main
git pull https://janitor.debian.net/git/libdynapath-clojure fresh-releases/pristine-tar
git pull https://janitor.debian.net/git/libdynapath-clojure fresh-releases/upstream

Summary

Merged new upstream version: 1.1.0 (was: 1.0.0).

Diff

Branch: main

diff --git a/.travis.yml b/.travis.yml
index f0bfe7e..e29027d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,2 +1,6 @@
 language: clojure
 script: lein test-all
+jdk:
+ - openjdk8
+ - openjdk11
+ - openjdk-ea
diff --git a/Changelog.md b/Changelog.md
index a3c59c7..0f6dcce 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,19 @@
+# 1.1.0 - 2019-11-25
+
+* Fall back to parsing the `java.class.path` sysprop if the base
+  loader doesn't have a dynapath implementation. This allows for some
+  classpath value to be returned when on Java 9+.
+  
+# 1.0.0 - 2017-10-25
+
+* BREAKING - Don't allow URLClassLoader to be modified. See the README
+  for more details.
+
+# 0.2.5 - 2016-12-09
+
+* Fix URLClassLoader extension to work with Java 9 nightly builds
+* Resolve classes at runtime instead of compile time to resolve AOT issues with Java 9
+
 # 0.2.4 - 2016-05-27
 
 * Update default extension to work with Java 9
diff --git a/README.md b/README.md
index 1f6ffa3..1888223 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# dynapath [![Build Status](https://secure.travis-ci.org/tobias/dynapath.png?branch=master)](https://travis-ci.org/tobias/dynapath)
+'# dynapath [![Build Status](https://secure.travis-ci.org/tobias/dynapath.png?branch=master)](https://travis-ci.org/tobias/dynapath)
 
 dynapath provides a protocol and util functions for class loaders that
 make their effective classpaths readable and/or modifiable.
@@ -35,14 +35,14 @@ Add it as a dependency:
 
 For a Leiningen/Boot project:
 
-    [org.tcrawley/dynapath "1.0.0"]
+    [org.tcrawley/dynapath "1.1.0"]
 
 For a maven project:
 
     <dependency>
       <groupId>org.tcrawley</groupId>
       <artifactId>dynapath</artifactId>
-      <version>0.2.4</version>
+      <version>1.1.0</version>
     </dependency>
 
 If you need to access or modify the effective classpath:
@@ -100,6 +100,7 @@ to do this.
 * [tair-repl](https://github.com/xumingming/tair-repl)
 * [pomegranate](https://github.com/cemerick/pomegranate)
 * [boot](http://boot-clj.com/)
+* [metabase](https://github.com/metabase/metabase)
 
 Are you using it? If so, add yourself to this list and send me a PR.
 
diff --git a/debian/changelog b/debian/changelog
index 1618637..098a7a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,6 @@
+libdynapath-clojure (1.1.0-1) UNRELEASED; urgency=low
+ -- Debian Janitor <janitor@jelmer.uk>  Mon, 29 Mar 2021 07:24:10 -0000
+
 libdynapath-clojure (1.0.0-3) unstable; urgency=medium
 
   [ Tom Marble ]
diff --git a/project.clj b/project.clj
index 70a5b46..ff4982a 100644
--- a/project.clj
+++ b/project.clj
@@ -1,4 +1,4 @@
-(defproject org.tcrawley/dynapath "1.0.0"
+(defproject org.tcrawley/dynapath "1.1.0"
   :description "An abstraction for modifiable/readable class loaders."
   :url "https://github.com/tobias/dynapath"
   :license {:name "Eclipse Public License"
@@ -15,7 +15,7 @@
                               [:url "https://github.com/tobias/"]
                               [:email "toby@tcrawley.org"]
                               [:timezone "-5"]]]
-  :aliases {"test-all" ["with-profile" "+1.4:+1.5:+1.6:+1.7:+1.8:+1.9" "test"]}
+  :aliases {"test-all" ["with-profile" "+1.4:+1.5:+1.6:+1.7:+1.8:+1.9:+1.10" "test"]}
   :profiles {:dev
              {:dependencies [[org.clojure/clojure "1.8.0"]]}
              :1.4
@@ -29,4 +29,6 @@
              :1.8
              {:dependencies [[org.clojure/clojure "1.8.0"]]}
              :1.9
-             {:dependencies [[org.clojure/clojure "1.9.0-beta2"]]}})
+             {:dependencies [[org.clojure/clojure "1.9.0"]]}
+             :1.10
+             {:dependencies [[org.clojure/clojure "1.10.1"]]}})
diff --git a/src/dynapath/util.clj b/src/dynapath/util.clj
index 21c57eb..a83786e 100644
--- a/src/dynapath/util.clj
+++ b/src/dynapath/util.clj
@@ -1,7 +1,8 @@
 (ns dynapath.util
   "Abstracts the getURLs and addURL functionality of URLClassLoader to a protocol."
   (:require [dynapath.dynamic-classpath :as dc]
-            dynapath.defaults)) ;; trigger the default implementations
+            dynapath.defaults) ;; trigger the default implementations
+  (:import [java.io File]))
 
 (defn addable-classpath?
   "Returns true if the given ClassLoader provides add-claspath-url."
@@ -21,11 +22,21 @@
   (if (readable-classpath? cl)
     (dc/classpath-urls cl)))
 
+(defn- system-classpath
+  "Starting with Java 9, the default class loader is no longer an
+  instance of URLClassLoader, so `classpath` returned an empty sequence.
+  See more in clojure/java.classpath"
+  []
+  (map #(-> (File. ^String %) .toURI .toURL)
+       (.split (System/getProperty "java.class.path")
+               (System/getProperty "path.separator"))))
+
 (defn all-classpath-urls
   "Walks up the parentage chain for a ClassLoader, concatenating any URLs it retrieves.
 If no ClassLoader is provided, RT/baseLoader is assumed."
   ([]
-     (all-classpath-urls (clojure.lang.RT/baseLoader)))
+   (or (seq (all-classpath-urls (clojure.lang.RT/baseLoader)))
+       (system-classpath)))
   ([cl]
      (->> (iterate #(.getParent ^ClassLoader %) cl)
           (take-while identity)
diff --git a/test/dynapath/util_test.clj b/test/dynapath/util_test.clj
index fe8fe42..4e26a90 100644
--- a/test/dynapath/util_test.clj
+++ b/test/dynapath/util_test.clj
@@ -37,8 +37,11 @@
 
   (deftest all-classpath-urls-should-use-the-baseLoader-when-called-with-a-zero-arity
     (add-classpath-url (clojure.lang.RT/baseLoader) (first urls))
-    (= (first urls) (last (all-classpath-urls))))
-  
+    (is (= (first urls) (last (all-classpath-urls)))))
+
+  (deftest all-classpath-urls-always-returns-something-when-called-with-a-zero-arity
+    (is (seq (all-classpath-urls))))
+
   (deftest add-classpath-url-should-work-for-an-addable-classpath
     (is (add-classpath-url *dynamic-cl* (last all-urls)))
     (is (= [(last all-urls)] (classpath-urls *dynamic-cl*))))

Branch: pristine-tar

diff --git a/libdynapath-clojure_1.1.0.orig.tar.gz.delta b/libdynapath-clojure_1.1.0.orig.tar.gz.delta
new file mode 100644
index 0000000..d8f3551
Binary files /dev/null and b/libdynapath-clojure_1.1.0.orig.tar.gz.delta differ
diff --git a/libdynapath-clojure_1.1.0.orig.tar.gz.id b/libdynapath-clojure_1.1.0.orig.tar.gz.id
new file mode 100644
index 0000000..3f43d9a
--- /dev/null
+++ b/libdynapath-clojure_1.1.0.orig.tar.gz.id
@@ -0,0 +1 @@
+8db504c323cf8a459c509cee71c8e927529e7d3e

Branch: upstream

Tag: upstream/1.1.0
diff --git a/.travis.yml b/.travis.yml
index f0bfe7e..e29027d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,2 +1,6 @@
 language: clojure
 script: lein test-all
+jdk:
+ - openjdk8
+ - openjdk11
+ - openjdk-ea
diff --git a/Changelog.md b/Changelog.md
index ab4158b..0f6dcce 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,9 @@
+# 1.1.0 - 2019-11-25
+
+* Fall back to parsing the `java.class.path` sysprop if the base
+  loader doesn't have a dynapath implementation. This allows for some
+  classpath value to be returned when on Java 9+.
+  
 # 1.0.0 - 2017-10-25
 
 * BREAKING - Don't allow URLClassLoader to be modified. See the README
diff --git a/README.md b/README.md
index f2c1865..1888223 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# dynapath [![Build Status](https://secure.travis-ci.org/tobias/dynapath.png?branch=master)](https://travis-ci.org/tobias/dynapath)
+'# dynapath [![Build Status](https://secure.travis-ci.org/tobias/dynapath.png?branch=master)](https://travis-ci.org/tobias/dynapath)
 
 dynapath provides a protocol and util functions for class loaders that
 make their effective classpaths readable and/or modifiable.
@@ -35,14 +35,14 @@ Add it as a dependency:
 
 For a Leiningen/Boot project:
 
-    [org.tcrawley/dynapath "1.0.0"]
+    [org.tcrawley/dynapath "1.1.0"]
 
 For a maven project:
 
     <dependency>
       <groupId>org.tcrawley</groupId>
       <artifactId>dynapath</artifactId>
-      <version>0.2.4</version>
+      <version>1.1.0</version>
     </dependency>
 
 If you need to access or modify the effective classpath:
diff --git a/project.clj b/project.clj
index 332bfb3..ff4982a 100644
--- a/project.clj
+++ b/project.clj
@@ -1,4 +1,4 @@
-(defproject org.tcrawley/dynapath "1.0.1-SNAPSHOT"
+(defproject org.tcrawley/dynapath "1.1.0"
   :description "An abstraction for modifiable/readable class loaders."
   :url "https://github.com/tobias/dynapath"
   :license {:name "Eclipse Public License"
@@ -15,7 +15,7 @@
                               [:url "https://github.com/tobias/"]
                               [:email "toby@tcrawley.org"]
                               [:timezone "-5"]]]
-  :aliases {"test-all" ["with-profile" "+1.4:+1.5:+1.6:+1.7:+1.8:+1.9" "test"]}
+  :aliases {"test-all" ["with-profile" "+1.4:+1.5:+1.6:+1.7:+1.8:+1.9:+1.10" "test"]}
   :profiles {:dev
              {:dependencies [[org.clojure/clojure "1.8.0"]]}
              :1.4
@@ -29,4 +29,6 @@
              :1.8
              {:dependencies [[org.clojure/clojure "1.8.0"]]}
              :1.9
-             {:dependencies [[org.clojure/clojure "1.9.0-beta2"]]}})
+             {:dependencies [[org.clojure/clojure "1.9.0"]]}
+             :1.10
+             {:dependencies [[org.clojure/clojure "1.10.1"]]}})
diff --git a/src/dynapath/util.clj b/src/dynapath/util.clj
index 21c57eb..a83786e 100644
--- a/src/dynapath/util.clj
+++ b/src/dynapath/util.clj
@@ -1,7 +1,8 @@
 (ns dynapath.util
   "Abstracts the getURLs and addURL functionality of URLClassLoader to a protocol."
   (:require [dynapath.dynamic-classpath :as dc]
-            dynapath.defaults)) ;; trigger the default implementations
+            dynapath.defaults) ;; trigger the default implementations
+  (:import [java.io File]))
 
 (defn addable-classpath?
   "Returns true if the given ClassLoader provides add-claspath-url."
@@ -21,11 +22,21 @@
   (if (readable-classpath? cl)
     (dc/classpath-urls cl)))
 
+(defn- system-classpath
+  "Starting with Java 9, the default class loader is no longer an
+  instance of URLClassLoader, so `classpath` returned an empty sequence.
+  See more in clojure/java.classpath"
+  []
+  (map #(-> (File. ^String %) .toURI .toURL)
+       (.split (System/getProperty "java.class.path")
+               (System/getProperty "path.separator"))))
+
 (defn all-classpath-urls
   "Walks up the parentage chain for a ClassLoader, concatenating any URLs it retrieves.
 If no ClassLoader is provided, RT/baseLoader is assumed."
   ([]
-     (all-classpath-urls (clojure.lang.RT/baseLoader)))
+   (or (seq (all-classpath-urls (clojure.lang.RT/baseLoader)))
+       (system-classpath)))
   ([cl]
      (->> (iterate #(.getParent ^ClassLoader %) cl)
           (take-while identity)
diff --git a/test/dynapath/util_test.clj b/test/dynapath/util_test.clj
index fe8fe42..4e26a90 100644
--- a/test/dynapath/util_test.clj
+++ b/test/dynapath/util_test.clj
@@ -37,8 +37,11 @@
 
   (deftest all-classpath-urls-should-use-the-baseLoader-when-called-with-a-zero-arity
     (add-classpath-url (clojure.lang.RT/baseLoader) (first urls))
-    (= (first urls) (last (all-classpath-urls))))
-  
+    (is (= (first urls) (last (all-classpath-urls)))))
+
+  (deftest all-classpath-urls-always-returns-something-when-called-with-a-zero-arity
+    (is (seq (all-classpath-urls))))
+
   (deftest add-classpath-url-should-work-for-an-addable-classpath
     (is (add-classpath-url *dynamic-cl* (last all-urls)))
     (is (= [(last all-urls)] (classpath-urls *dynamic-cl*))))

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/share/java/dynapath-1.1.0.jar
lrwxrwxrwx  root/root   /usr/share/java/dynapath.jar -> dynapath-1.1.0.jar

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/share/java/dynapath-1.0.0.jar
lrwxrwxrwx  root/root   /usr/share/java/dynapath.jar -> dynapath-1.0.0.jar

No differences were encountered in the control files

Lintian Result

Full worker log Full build log