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

cljr-sort-project-dependencies drop :dependencies section when using managed-dependencies #520

Open
iomonad opened this issue Jul 5, 2022 · 2 comments

Comments

@iomonad
Copy link

iomonad commented Jul 5, 2022

Expected behavior

When using :managed-dependencies in a leiningen project, the :dependencies section is dropped
while using cljr-sort-project-dependencies instead of being sorted

Steps to reproduce the problem

Assuming this project.clj file:

(defproject superfun/happyslide "1.0.0-SNAPSHOT"
  :description "A Clojure project with managed dependencies"
  :min-lein-version  "2.7.0"
  :managed-dependencies [[clj-time "0.12.0"]
                         [me.raynes/fs "1.4.6"]
                         [ring/ring-codec "1.0.1"]]
  :dependencies [[clj-time]
                 [me.raynes/fs]])

After: M-x cljr-sort-project-dependencies

Buffer is updated as follow:

(defproject superfun/happyslide "1.0.0-SNAPSHOT"
  :description "A Clojure project with managed dependencies"
  :min-lein-version  "2.7.0"
  :managed-dependencies [[clj-time "0.12.0"]
                         [me.raynes/fs "1.4.6"]
                         [ring/ring-codec "1.0.1"]]
  :dependencies )

Environment & Version information

clj-refactor.el version information

clj-refactor 2.5.1 (package: 20210628.1154), refactor-nrepl 2.5.1

CIDER version information

;; CIDER 1.2.0snapshot (package: 20210812.654), nREPL 0.9.0-beta1
;; Clojure 1.8.0, Java 1.8.0_302

Leiningen or Boot version

Leiningen 2.9.5 on Java 1.8.0_302 OpenJDK 64-Bit Server VM GraalVM CE 20.3.3

Emacs version

GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-09

Operating system

Linux 5.15.25-gentoo x86_64

@vemv
Copy link
Member

vemv commented Jul 5, 2022

Hi! Thanks for the report.

Perhaps there's an easy fix but probably nobody will spontaneously look at it. If you could check out the .el code, that would be much appreciated.

btw there's https://github.com/kkinnear/zprint/blob/1.2.3/doc/reference.md#sort-dependencies

@iomonad
Copy link
Author

iomonad commented Jul 6, 2022

Thanks, I'll try to find a way to correct this on free time 👍

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