You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two related gaps in clojure.core file I/O on stock Glojure v0.7.25 (8ab940f).
1. spit cannot resolve gio/writer
From a writable temporary directory:
glj -e '(spit "glojure-test.txt" "hello")'
On Linux this fails with unable to resolve host form: gio.writer. Expected: create the file with the supplied text. clojure.core/spit calls gio/writer, but the public writer definition is commented out even though the make-writer machinery exists.
2. slurp interprets a Windows drive letter as a URI scheme
Given an existing file at C:\Temp\glojure-test.txt on Windows, this should return its contents:
(slurp"C:\\Temp\\glojure-test.txt")
Passing that same path string to stock v0.7.25 on Linux reproduces the misclassification: unsupported protocol scheme "c". I have not rerun the file read on Windows. The string input-stream implementation tries ParseRequestURI before opening a local path, so the drive prefix takes the URL branch.
Possible fixes: expose writer through the existing make-writer path, and distinguish native absolute paths from URIs before dispatch. Windows drive paths should work for reading and writing without changing behavior for real file:, http:, and https: URLs. Regression coverage for both source-loaded and AOT paths would be useful.
Activity