Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean-namespace is failing in CLJS and CLJ projects #363

Closed
dgtized opened this issue Feb 8, 2022 · 3 comments
Closed

clean-namespace is failing in CLJS and CLJ projects #363

dgtized opened this issue Feb 8, 2022 · 3 comments

Comments

@dgtized
Copy link

dgtized commented Feb 8, 2022

After upgrading to latest clj-refactor today, I started getting an error after invoking cljr-clean-ns in both CLJ and CLJS projects. The error is if: Don’t know how to create ISeq from: clojure.core$memoize$fn__6894.

Given the timing of when this behavior appeared and the error message itself mentioning memoize, I'm a bit suspicious of unexpected side effects from https://github.com/clojure-emacs/refactor-nrepl/pull/361/files#diff-035aaed83c906822f30146de70e4bf30dea2ae463de4aed2927bd9d0e2383e55R25. However, I did also upgrade some other things today, so it's possible that's a red herring.

Expected behavior

Executing cljr-clean-ns in a CLJS/CLJC file should clean the namespace.

Actual behavior

An emacs error condition, with the following error in the Messages buffer:

if: Don’t know how to create ISeq from: clojure.core$memoize$fn__6894

Steps to reproduce the problem

cider-jack-in-cljs to a project, open a namespace and run cljr-clean-ns.

I also tried this on an old CLJ project and encountered the same error. It seemed like it may have run successfully the first time but not on subsequent invocations?

Environment & Version information

clj-refactor.el and refactor-nrepl version information

clj-refactor 3.3.0 (package: 20220207.2352), refactor-nrepl 3.3.0

CIDER version information

For CLJS

;; Connected to nREPL server - nrepl://localhost:42119
;; CIDER 1.3.0-snapshot, nREPL 0.9.0
;; Clojure 1.10.3, Java 1.8.0_312
;;  Startup: /usr/local/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0"} cider/piggieback {:mvn/version "0.5.2"} refactor-nrepl/refactor-nrepl {:mvn/version "3.3.0"} cider/cider-nrepl {:mvn/version "0.28.1"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}}}' -Mdev:cider/nrepl

For CLJ:

;; Connected to nREPL server - nrepl://localhost:40225
;; CIDER 1.3.0-snapshot, nREPL 0.9.0
;;  Startup: /usr/local/bin/clojure -A:perf -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.3.0"} cider/cider-nrepl {:mvn/version "0.28.1"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl

Emacs version

GNU Emacs 29.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2022-02-07

Operating system

Ubuntu Linux 20.04

@vemv
Copy link
Member

vemv commented Feb 8, 2022

Checking out, thanks for the report

vemv added a commit that referenced this issue Feb 8, 2022
@vemv vemv closed this as completed in 8a0042a Feb 8, 2022
@vemv
Copy link
Member

vemv commented Feb 8, 2022

refactor-nrepl + clj-refactor.el 3.3.1 have been released (it can take a couple hours for melpa to pick up the latter).

Thanks again for the report!

@dgtized
Copy link
Author

dgtized commented Feb 8, 2022

Thanks so much for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants