suggest-libspecs
op: support collections for:only
values.
- #401
resolve-missing
no longer returns the wrong type - #401
resolve-missing
no longer returns non-import
able classes. - #402
resolve-missing
now flags with:already-interned true
the candidates that are already interned into the calling namespace.- This helps clients avoiding the suggestion/insertion of candidates which are redundant
- e.g.
+
is already interned, so isThread
- same for
:refer
s and:rename
s
- e.g.
- This helps clients avoiding the suggestion/insertion of candidates which are redundant
- Fix a bug the newly introduced .cljc detection.
- #396 Handle the analyzing and parsing of Clojure code from .cljc files.
- Upgrade various dependencies: #393, #394 & #395.
- Does not impact users, since we use mranderson.
- The
rename-file-or-dir
op is now also able to rename .cljs files that depended on .clj files via :require-macros #394. ns-tracker
no longer ignores cljs files with string requires #394.- note that
ns-tracker
is normally used for clj files only.
- note that
- Fix an oversight in
suggest-libspecs
.
- Implement new middleware op:
suggest-libspecs
- Supports a beta clj-refactor.el feature.
- #387: extend clj-kondo
:unused-namespace
integration. Now namespace local configuration is also taken into account.:libspec-whitelist
can be augmented for particular namespace by:- Adding
:unused-namespace
linter configuration under:config-in-ns
key in clj-kondo's config file. Like so::config-in-ns {example.target.ns {:linters {:unused-namespace {:exclude [ns.to.exclude]}}}}
- Adding
:unused-namespace
linter configuration under:clj-kondo/config
key in metadata or attribute map of namespace. Like so:(ns example.target.ns {:clj-kondo/config '{:linters {:unused-namespace {:exclude [ns.to.exclude]}}}})
- Adding
- #385: only
suggest-aliases
that are valid symbols.- Fixes an edge case for cljr-refactor.el's
cljr-slash
.
- Fixes an edge case for cljr-refactor.el's
- #383:
prune-dependencies
: increase accuracy for:cljs
.
- #382:
refactor-nrepl.artifacts
: increase resiliency.
- #378: Fix
:as-alias
handling for .cljc files.
- Refine
:as-alias
detection.
- #374: support Clojure 1.11's new
:as-alias
namespace directive.
- #373: revert accidentally-changed
namespace-aliases
error handling default.
- Offer
refactor-nrepl.ns.libspecs/namespace-aliases-for
function.- It's basically like
namespace-aliases
, but accepts files rather than dirs as an argument, which can be more flexible for programmatic use.
- It's basically like
- #369: Implement "suggest" option for the
namespace-aliases
op.- This allows end-users to type Stuart Sierra style aliases and have them completed, even if this alias wasn't in use anywhere in a given codebase.
- #173:
rename-file-or-dir
: rename more kinds of constructs in dependent namespaces: namespace-qualified maps, fully-qualified functions, metadata. - #194: Don't prune
require
forms if they are needed for a givenimport
to work. - #142:
read-ns-form
: report more informatively when a non-existing file is being processed.
- #363: Fix a memoization bug in
clean-namespace
.
- #361 Honor clj-kondo
:unused-namespace
config, if present- This piece of config can inform/complement refactor-nrepl's own config.
- If you are using refactor-nrepl programatically (as opposed to as nREPL middleware), you can improve performance by using
refactor-nrepl.ns.libspec-allowlist/with-memoized-libspec-allowlist
prior to invokingclean-ns
.
- Fix a minor artifact in the previous release (the version would be reported as 0.0.0).
- Upgrade Orchard.
- Address minor warnings that could be seen under the Clojure 1.11 series.
- Accomplished by upgrading Orchard, and
tools.analyzer.jvm
.
- Accomplished by upgrading Orchard, and
- #355: Disable the side-effects (as protocol extensions) performed by the
fs
library.
- #344: make clean-ns's style closer to the how to ns style.
- #333: skip scanning irrelevant directories in more places (as it was already done for various other functionalities; this limits ananlysis/refactoring to your source/test paths, skipping other artifacts).
- Make
resolve-missing
able to find even more classes than before. - #346: refine the heuristic for ignoring irrelevant dirs (see the above bullet point).
- Introduce
print-right-margin
/print-miser-width
configuration options, used duringpprint
ing of ns forms.- The default is one that is consistent with refactor-nrepl's traditional behavior.
- You can set both to
nil
for disabling line wrapping.
- ns form printing: also wrap single-segment namespaces in a vector.
- (Part of #230): Parallelize various functionality
- This will have a noticeable improvement in e.g. clj-refactor.el's
cljr-slash
performance.
- This will have a noticeable improvement in e.g. clj-refactor.el's
- #291: The
:ignore-errors
option will be honored in more places, making refactor-nrepl more robust in face of files not particularly meant to be part of the AST corpus.- Examples: WIP files, Moustache template files, scripts.
- Upgrade Orchard
- Worth emphasizing: now the following options are available https://github.com/clojure-emacs/orchard/tree/v0.7.0#configuration-options
- They can make the refactor-nrepl experience simpler / more robust.
- Upgrade rewrite-clj
- This fixes some features such as
rename-file-or-dir
.
- This fixes some features such as
- Reliability improvement: try using
require
prior tofind-ns
- This increases the chances that a namespace will be found, which in turns makes refactor-nrepl more complete/accurate.
- #306: Replace Cheshire with
clojure.data.json
. - Build ASTs more robustly (by using locks,
require
, and ruling out certain namespaces like refactor-nrepl itself) - Improve
namespace-aliases
performance and make it return more accurate results. - Honor internal
future-cancel
calls, improving overall responsiveness and stability.
- #335: Strengthen
resolve-missing
against various edge cases. - #289: Fix an edge-case with involving keywords that caused find-symbol to crash.
- #305: Don't put
:as
or:refer
on their own lines in the ns form, when the libspec is so long it causes the line to wrap. - clojure-emacs/clj-refactor.el#459:
clean-ns
should conform to the style guide:(:require
in the ns form should be followed by a newline.- You can opt out via the new
:insert-newline-after-require
configuration option.
- You can opt out via the new
- #294: Properly skip uneval nodes when looking for the first/last sexp
- From now on, if you set the
clojure.tools.namespace.repl/refresh-dirs
, files outside saidrefresh-dirs
won't be analyzed, resulting in safer, more efficient analysis.
- #284: Don't truncate the artifacts cache.
- Updated all deps.
- clojure-emacs/clj-refactor.el#443:
clean-ns
support namespaces with js literal (#js). - #251:
clean-ns
support extra message keyrelative-path
, which will be used ifpath
does not exist. - #264: Less bandwidth used to fetch artifacts from Clojars.
- #268: Added support for fetching artifact versions from Clojars.
- #271: Improved shadow-cljs support.
- Drop support for nREPL 0.2.
- #256: Ignore malformed artifact coordinates when fetching from Clojars.
- #215: Support JVM system proxy in mvn artifacts listing.
- #231: Hotload-dependencies temporarily disabled due to java 10 issues.
- #198: Delay middleware loading to speed up initialization.
- Drop Clojure 1.7.0 support.
- Bump mranderson: Version to fix leiningen 2.8.x incompatibility issues.
- #187 Update clojure.tools.reader so Clojure 1.9 namespaced map literals don't cause parse errors.
- #185 Report throwables of type
Error
instead of swallowing them. - #186 Make sure
resolve-missing
still works, even if a candidate class has missing dependencies. - #184 In
resolve-missing
, prevent classpaths with many entries from causing a stack overflow. - clojure-emacs/clj-refactor.el#330
clean-ns
removes imported inner inner classes. - clojure-emacs/clj-refactor.el#330
clean-ns
ignores namespaced keywords. - #160 Make
resolve-missing
find newly defined vars and types (clj). Because of a stale cache, newly added vars or types would not be found. This fix takes into account vars/types added by eval-ing code (rescan affected namespace), and by hotloading dependencies (reset the cache). - clojure-emacs/clj-refactor.el#362 Preserve all shorthand style metadata when
clean-ns
is used. - #192 Clean ns understands
$
as a symbol. Specially this enables clean ns to work with incanter that does have function named$
. - clojure-emacs/clj-refactor.el#332 Fix regression when inner class needs to be imported, strangely implementation of multiple levels of nested inner classes broke the simpler case.
- #169 Fix java9 compatibility issues.
- New config setting
:libspec-whitelist
which makes it possible to create a seq of namespacesclean-ns
shouldn't prune. This is useful for libspecs which aren't used except through side-effecting loads. - New config setting
:ignore-paths
for ignoring certain paths when finding dirs on classpath.
- Add
find-used-publics
which list occurrences of symbols defined in namespace A in namespace B. - #145 Enable caching for resolve missing
- Add support for skipping excluded dependencies. This patch tweaks the dependency checker, so that refactor-nrepl will activate itself normally if one of its dependencies is listed in a project's :exclusions. This enables a user to for instance exclude org.clojure/clojure and provide a fork, thus taking on all responsibility for providing an adequate version.
- Fix resolve-missing for cljs. Before this fix, the cljs-path returned only a single candidate. That's because every candidate was merged together. We now use
merge-with into
to generate a list of candidates instead. - #147 Avoid needless .cljc namespace reader macro usage
- #133 Filter out clojure source files without ns form when indexing/analyzing so projects whith such files are supported.
- Add support for
:rename
clauses in clean ns. - Add cljc support to
clean-ns
. - Add cljs support to
clean-ns
. rename-file-or-dir
now knows how to move cljs files.- The
artifact-version
list is now sorted. - Add
namespace-aliases
which provides a mapping of the namespace aliases that are in use in the project. - Make
find-symbol
able to handle macros.
- clojure-emacs/clj-refactor.el#223 Fix clean-ns removing metadata when file starts with a comment.
- #103
find-symbol
failes in projects withcljc
files. - #106 Failure to build ASTs when namespaced keywords are present in the project.
- #127 tools.namespace's tracker doesn't handle namespaces of same name across dialects. Temporary fix,
:require-macros
dependencies not tracked across platforms, also see TNS-38 - #91 Find usages/Rename symbol gets confused after rename file or dir
- #126 Build AST for nses in project in topological order, fixes problem when protocols got evaluated after dependent deftypes resulting in
No implementation of method
type errors.
- #132 When the middleware is started with the wrong Clojure version we now warn and exclude the middleware instead of failing catastrophically.
resolve-missing
now returns a map instead of an alist.- clojure-emacs/clj-refactor.el#275 clean-ns will no longer prune cljsjs requires.
- New option for
clean-ns
,prune-ns-form
, to avoid pruning the ns-form. - Get rid of the client namespace
- #118 Improve the
find-symbol
reply. It's now a map instead of a vector. - Remove
find-debug-fns
. None of us ever used this and there's some overlap withfind-usages
. - Rename
find-unbound
tofind-used-locals
. This is what this op has been doing for the last several versions. - Drop the
configure
op, and receive settings in each message. - More relaxed when building ASTs so some coding errors are tolerated and AST based features work with slightly broken code
- Add
rename-file-or-dir
which returns a file or a directory of clj files. - Add
extract-definition
which returns enough information to the clien to afford inlining of defs defns and let-bound vars. - Add
stubs-for-interface
for creating skeleton interface implementations - Add
warm-ast-cache
op for eagerly building, and caching, ASTs of project files
- add 'version' op, which returns the current version of refactor-nrepl to the client.
- fix for clean-ns removing import only used in macro
- fix for clean-ns removes classes used only in typehints
- workaround for analyzer bug which results in wrong filename in var meta
- fix for find-unbound edge cases
- fix problem in clean-ns caused by mranderson (inlining) limitation
- various bugfixes in clean-ns
- improvements on error messages
- fix in find unbound in case of s-expression is inside a macro
- resolve missing works for static method, field and resolve missign will work right after hotload dependency
- throw an error for cljs and cljx file: they are not supported (yet)
- minor refactorings, clean ups
- readme tweaks
- fix for find-unbound does not always figure out the right parameters for new function
- Config setting for
clean-ns
to not do any prefix rewriting - Add
configure
op to set various config opts. - Remove find referred
- Add
hotload-dependency
which loads a new project dependency into the repl - Add caching of ASTs for better performance
- Add
resolve-missing
which resolves a missing symbol by scanning the classpath - Add
clean-ns
which performs various cleanups on the ns form. - various cleaning and refactoring stuff
- AST creation: analyze-ns instead of plain analyze which also evals the code
- find usages
- rename symbols
- find (debug) invocations
- find referred
- artifact lookup