namespace-aliases
could guard against unreadable files
#291
Labels
namespace-aliases
could guard against unreadable files
#291
Uh oh!
There was an error while loading. Please reload this page.
Brief
namespace-aliases
i.e. the defn that backscljr-slash
, breaks if there's any .clj file with invalid syntax in a given project.There's kind of a legitimate use case for .clj files with invalid syntax:
moustache
d clojureAs an aggraviating condition, cljr-slash omits errors, making this issue hard to debug / easy to forget.
So,
namespace-aliases
could omit files with invalid syntax, instead of throwing exceptions in presence of these filesSteps to reproduce the problem
echo "totally-invalid(((((((" > src/sample.clj
refactor-nrepl.ns.libspecs/namespace-aliases
Suggestion
In:
refactor-nrepl/src/refactor_nrepl/ns/libspecs.clj
Line 50 in dbafd6e
augment the
(some-fn ...)
, with(every-pred readable? (some-fn ...))
, wherereadable?
is a defn that tries reading the ns form with tools.reader + tools.namespace.parse, returning false if any exception would have been thrown.clj-refactor.el and refactor-nrepl version information
Both repos @
master
The text was updated successfully, but these errors were encountered: