Skip to content

cljr-add-project-dependency document support for deps.edn #547

Description

@bo-tato

The docstring says Add a dependency to the project.clj file. so I thought it will only support lein, but I tried it on my deps.edn project and was pleasantly surprised it worked great 😄
Maybe change the docstring to Add a dependency to project.clj or deps.edn?

Also could maybe improve the error message a little in the case where it doesn't find the project file, maybe in cljr--add-project-dependency change it to something like:

(if-let ((project-file (cljr--project-file))
         (deps (cljr--project-with-deps-p project-file)))
    (cljr--update-file project-file
     ...)
  (error "no project file found"))

so it gives a clear error message with the reason rather than just nil isn't stringp in cljr--project-with-deps-p

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions