Changelog
October 23, 2022 ยท View on GitHub
Unreleased
3.6.0
- #387: extend clj-kondo
:unused-namespaceintegration. Now namespace local configuration is also taken into account.:libspec-whitelistcan be augmented for particular namespace by:- Adding
:unused-namespacelinter configuration under:config-in-nskey in clj-kondo's config file. Like so::config-in-ns {example.target.ns {:linters {:unused-namespace {:exclude [ns.to.exclude]}}}} - Adding
:unused-namespacelinter configuration under:clj-kondo/configkey in metadata or attribute map of namespace. Like so:(ns example.target.ns {:clj-kondo/config '{:linters {:unused-namespace {:exclude [ns.to.exclude]}}}})
- Adding
3.5.5
- #385: only
suggest-aliasesthat are valid symbols.- Fixes an edge case for cljr-refactor.el's
cljr-slash.
- Fixes an edge case for cljr-refactor.el's
3.5.4
- #383:
prune-dependencies: increase accuracy for:cljs.
3.5.3
- #382:
refactor-nrepl.artifacts: increase resiliency.
3.5.2
- #378: Fix
:as-aliashandling for .cljc files.
3.5.1
- Refine
:as-aliasdetection.
3.5.0
- #374: support Clojure 1.11's new
:as-aliasnamespace directive.
3.4.2
- #373: revert accidentally-changed
namespace-aliaseserror handling default.
3.4.1
- Offer
refactor-nrepl.ns.libspecs/namespace-aliases-forfunction.- 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
3.4.0
- #369: Implement "suggest" option for the
namespace-aliasesop.- 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.
3.3.2
- #173:
rename-file-or-dir: rename more kinds of constructs in dependent namespaces: namespace-qualified maps, fully-qualified functions, metadata. - #194: Don't prune
requireforms if they are needed for a givenimportto work. - #142:
read-ns-form: report more informatively when a non-existing file is being processed.
3.3.1
- #363: Fix a memoization bug in
clean-namespace.
3.3.0
- #361 Honor clj-kondo
:unused-namespaceconfig, 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-allowlistprior to invokingclean-ns.
3.2.2 (2022-01-29)
- Fix a minor artifact in the previous release (the version would be reported as 0.0.0).
3.2.1 (2022-01-29)
- Upgrade Orchard.
3.2.0 (2022-01-09)
Changes
- 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
fslibrary.
3.1.0 (2021-11-09)
Changes
- #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-missingable 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-widthconfiguration options, used duringpprinting of ns forms.- The default is one that is consistent with refactor-nrepl's traditional behavior.
- You can set both to
nilfor disabling line wrapping.
- ns form printing: also wrap single-segment namespaces in a vector.
3.0.0 (2021-10-25)
Changes
- (Part of #230): Parallelize various functionality
- This will have a noticeable improvement in e.g. clj-refactor.el's
cljr-slashperformance.
- This will have a noticeable improvement in e.g. clj-refactor.el's
- #291: The
:ignore-errorsoption 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
requireprior 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-aliasesperformance and make it return more accurate results. - Honor internal
future-cancelcalls, improving overall responsiveness and stability.
Bugs fixed
- #335: Strengthen
resolve-missingagainst various edge cases. - #289: Fix an edge-case with involving keywords that caused find-symbol to crash.
- #305: Don't put
:asor:referon 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-nsshould conform to the style guide:(:requirein the ns form should be followed by a newline.- You can opt out via the new
:insert-newline-after-requireconfiguration 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-dirswon't be analyzed, resulting in safer, more efficient analysis.
2.5.1 (2021-02-16)
Bugs fixed
- #284: Don't truncate the artifacts cache.
Changes
- Updated all deps.
2.5.0 (2020-02-29)
New features
- clojure-emacs/clj-refactor.el#443:
clean-nssupport namespaces with js literal (#js). - #251:
clean-nssupport extra message keyrelative-path, which will be used ifpathdoes 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.
Changes
- Drop support for nREPL 0.2.
Bugs fixed
- #256: Ignore malformed artifact coordinates when fetching from Clojars.
2.4.0 (2018-08-26)
New features
- #215: Support JVM system proxy in mvn artifacts listing.
Changes
- #231: Hotload-dependencies temporarily disabled due to java 10 issues.
- #198: Delay middleware loading to speed up initialization.
- Drop Clojure 1.7.0 support.
Bugs fixed
- Bump mranderson: Version to fix leiningen 2.8.x incompatibility issues.
2.3.1
Bugs fixed
- #187 Update clojure.tools.reader so Clojure 1.9 namespaced map literals don't cause parse errors.
- #185 Report throwables of type
Errorinstead of swallowing them. - #186 Make sure
resolve-missingstill 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-nsremoves imported inner inner classes. - clojure-emacs/clj-refactor.el#330
clean-nsignores namespaced keywords. - #160 Make
resolve-missingfind 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-nsis 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.
Changes
- #169 Fix java9 compatibility issues.
New features
- New config setting
:libspec-whitelistwhich makes it possible to create a seq of namespacesclean-nsshouldn't prune. This is useful for libspecs which aren't used except through side-effecting loads. - New config setting
:ignore-pathsfor ignoring certain paths when finding dirs on classpath.
2.2.0
New features
- Add
find-used-publicswhich 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.
Bugs fixed
- 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 intoto generate a list of candidates instead. - #147 Avoid needless .cljc namespace reader macro usage
Changes
- #133 Filter out clojure source files without ns form when indexing/analyzing so projects whith such files are supported.
2.0.0
New features
- Add support for
:renameclauses in clean ns. - Add cljc support to
clean-ns. - Add cljs support to
clean-ns. rename-file-or-dirnow knows how to move cljs files.- The
artifact-versionlist is now sorted. - Add
namespace-aliaseswhich provides a mapping of the namespace aliases that are in use in the project. - Make
find-symbolable to handle macros.
Bugs fixed
- clojure-emacs/clj-refactor.el#223 Fix clean-ns removing metadata when file starts with a comment.
- #103
find-symbolfailes in projects withcljcfiles. - #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-macrosdependencies 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 methodtype errors.
Changes
- #132 When the middleware is started with the wrong Clojure version we now warn and exclude the middleware instead of failing catastrophically.
resolve-missingnow 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-symbolreply. 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-unboundtofind-used-locals. This is what this op has been doing for the last several versions. - Drop the
configureop, 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
1.1.0
- Add
rename-file-or-dirwhich returns a file or a directory of clj files. - Add
extract-definitionwhich returns enough information to the clien to afford inlining of defs defns and let-bound vars. - Add
stubs-for-interfacefor creating skeleton interface implementations - Add
warm-ast-cacheop for eagerly building, and caching, ASTs of project files
1.0.5
- add 'version' op, which returns the current version of refactor-nrepl to the client.
1.0.4
- 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
1.0.3
- fix problem in clean-ns caused by mranderson (inlining) limitation
1.0.2 (this is broken version, please use 1.0.3!)
- 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
1.0.1
- 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
1.0.0
- Config setting for
clean-nsto not do any prefix rewriting - Add
configureop to set various config opts. - Remove find referred
- Add
hotload-dependencywhich loads a new project dependency into the repl - Add caching of ASTs for better performance
- Add
resolve-missingwhich resolves a missing symbol by scanning the classpath - Add
clean-nswhich performs various cleanups on the ns form. - various cleaning and refactoring stuff
0.2.2
- AST creation: analyze-ns instead of plain analyze which also evals the code
0.2.1
- find usages
- rename symbols
0.1.0
- find (debug) invocations
- find referred
- artifact lookup