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

Can't run Neil using clojure cli (using a global alias from README) in the neil source code directory #246

Closed
a13 opened this issue Dec 7, 2024 · 3 comments

Comments

@a13
Copy link
Contributor

a13 commented Dec 7, 2024

babashka v1.3.191

Clojure CLI version 1.12.0.1479

neil v0.3.68

problem

Can't run Neil using clojure cli (using a global alias from README) in the neil source code directory.

repro

  1. put
:neil {:deps {io.github.babashka/neil {:git/tag "v0.3.68"
                                       :git/sha "78ffab1"}}
       :main-opts ["-m" "babashka.neil"]}

alias into ~/.clojure/deps.edn

  1. run clj -M:neil dep search foo from the directory with neil source code (or any other directory containing deps.edn file with :neil alias)

actual behavior

"Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
dep (No such file or directory)

Full report at:
/tmp/clojure-11707584721737191941.edn
"

expected behavior

clj -M:neil dep search foo returns the list of libraries

It looks like the problem is that the :neil alias from deps.edn overrides the global one. Can we change one of these to something else?

@borkdude
Copy link
Contributor

borkdude commented Dec 7, 2024

This is just standard clojure CLI behavior, an alias in the local directory overrides the global alias. Unfortunately we can't change this convention since it's a convention used by neil itself to store the version information of a project in there. What we could do is add the main opts in there so you can run the alias in the local project as well.

@a13
Copy link
Contributor Author

a13 commented Dec 7, 2024

What we could do is add the main opts in there so you can run the alias in the local project as well.

I think mentioning this in the README would be good enough.

@borkdude
Copy link
Contributor

borkdude commented Dec 9, 2024

I think mentioning this in the README would be good enough.

PR welcome

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