leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
2019-02-28T15:32:02.002200Z

java.io.IOException: Permission denied. Please check your access rights for /usr/local/bin/lein/repl-port
 at leiningen.repl$repl.invokeStatic (repl.clj:385)
    leiningen.repl$repl.doInvoke (repl.clj:316)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    leiningen.repl$repl.invokeStatic (repl.clj:374)
    leiningen.repl$repl.invoke (repl.clj:316)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132) 

alexmiller 2019-02-28T15:33:55.003300Z

use the ` at beginning and end

2019-02-28T15:35:32.004400Z

So, brew updated lein to 2.9.1 and now I get this. Did a bunch of searching the web but no obvious clues. Have checked various rights on folders and stuff but most seem fine. Lein works, just not the repl.

2019-02-28T15:39:12.005400Z

So maybe something with opening ports? :thinking_face:

2019-02-28T15:43:27.009500Z

Hi, I'm using yogthos/migratus to establish code based migrations for my application. I store them in a migrations/ dir under src/clj/. I'm able to run lein run and the migrations appear just fine. However, when I switch to lein uberjar, the code based migrations don't appear in the class path. Am I missing something? I searched a lot but I can't seem to find any direct clues. Closest thing I saw was this. https://github.com/yogthos/migratus/issues/63 Please let me know if this isn't the right channel for this.

2019-03-01T14:09:49.030800Z

whats ur db spec?

2019-03-01T14:10:13.031Z

as for running from jar, you need your jar entry point to deal with migrations

2019-03-01T14:10:32.031200Z

so, the jar defines a main-class, that usually resolves to a (defn -main[&args])

2019-03-01T14:10:39.031400Z

that -main should handle the “migrate” case

2019-03-01T14:11:28.031600Z

as for the db-spec, I think migratus expects something like

{:store         :database
     :init          "init.sql"
     :migration-dir "migrations"
     :db            "jdbc:url...."}

2019-02-28T15:45:05.010100Z

@mattias504 what version were you using previously? curious, but may not know your answer

2019-02-28T15:45:32.010600Z

I would think perhaps you have an old file there somehow though that has wrong permissions. Maybe can delete it hah

2019-02-28T15:49:26.011Z

@lpanda2014 why not store things like discussed in that linked issue?

2019-02-28T16:00:41.011800Z

hmm i tried doing that (putting the clj files in the resources/migrations/ folder) and they were added to the classpath but the migrations wouldn't run

2019-02-28T16:00:59.012Z

^ @mikerod

2019-02-28T16:05:02.013600Z

Thanks for answering - I think it was 2.9.0? I also realized now that it works normally if I run in a project directory. Just the standalone repl that complains.

2019-02-28T16:07:32.014700Z

I also have no file “/usr/local/bin/lein/repl-port”, so maybe I’m missing something or it’s a message that requires more of the reader 😅

2019-02-28T16:34:05.014800Z

So, when doing cider-jack-in I get this. I assume it is some general version mismatch, but maybe it gives someone something:

2019-02-28T16:34:08.014900Z

For information about GNU Emacs and the GNU system, type C-h C-a.
[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.5.3\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.19.0-SNAPSHOT\"\] -- repl :headless :host localhost...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: clojure.lang.Compiler$CompilerException: Syntax error compiling var at (cider/nrepl/middleware/pprint.clj:74:3).
#:clojure.error{:phase :compile-syntax-check, :line 74, :column 3, :source "cider/nrepl/middleware/pprint.clj", :symbol var}
 at clojure.lang.Compiler.analyzeSeq (Compiler.java:7114)
    clojure.lang.Compiler.analyze (Compiler.java:6789)
    clojure.lang.Compiler.analyze (Compiler.java:6745)
    clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3820)

2019-02-28T17:10:11.015500Z

@mattias504 > Just the standalone repl that complains. ah, I never use this, but when in a project dir it does make a repl-port file. seems like that is just a permission issue where lein is running then perhpaps

2019-02-28T17:11:20.016100Z

And you have a question it looks like a cider problem. I think you probably just need to use a newer version of cider

2019-02-28T18:11:37.016800Z

Ah, cool. Haven’t checked Cider version. Thanks!

2019-02-28T18:13:28.017500Z

@mattias504 in modern cider, if you are doing clj (not cljs) I think you want to use cider-jack-in-clj too, I’m not sure how it compares to cider-jack-in since that still exists too (maybe it defaults to that or something)

2019-02-28T18:13:47.017900Z

but yeah, I’m wondering if an older jack-in used some too old auto-injected nrepl deps

2019-02-28T18:14:07.018300Z

or perhaps you are providing old versions of middleware in your :dependencies somehow that are clashing. remember to check ~/.lein/profiles.clj if you have some setup

2019-02-28T18:22:28.020100Z

I’m new to this stuff - mostly everything is pretty recently installed. Didn’t know about the newer jack-in. That’s the problem with information on the internet 😛

2019-02-28T18:25:55.020700Z

What isyour M-x cider-version

2019-02-28T18:26:23.021300Z

And I’m out-of-touch with the new jack-in’s and how they relate, there is cider-jack-in-clj, cider-jack-in-cljs, cider-jack-in-clj&cljs, and cider-jack-in

2019-02-28T18:26:40.021700Z

new ones make sense to me, not sure what cider-jack-in does now though

2019-02-28T18:26:56.022100Z

There is a #cider channel though and this may also be in it’s doc pages, so I’ll leave it at that for exploration

2019-02-28T18:27:26.022600Z

if you are up-to-date you think, then perhaps the injection is fine, and maybe your project is throwing an old nrepl middleware on the path some other way.

2019-02-28T18:28:53.023900Z

lein 2.9.x+ I believe changed it’s own clj version to 1.10, which perhaps introduced new compile-time syntax failures. So if you came from 2.9.0, I am a little surprised you’d break to 2.9.1, but there could be more here than I am aware of.

cichli 2019-02-28T19:06:18.024Z

Try updating your CIDER install, it should be using nrepl 0.6.0 and cider-nrepl 0.21.1