tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
2020-07-13T16:55:35.360500Z

When I used rebel-readline with a background process (Figwheel {:mode :serve} , http-kit, etc), the default rebel-readline/-main won't automatically end those processes if you quit with 'ctrl+d'. Looks like REPL-y does (shutdown-agents) when done, I haven't checked what nrepl.cmdline does with that specific case It's not a bug, just a difference (https://github.com/bhauman/rebel-readline/issues/141) In my case I decided to start both then just exit when done:

(figwheel.main.api/start {:mode :serve} "dev")
(rebel-readline.main/-main)
(System/exit 0)
I currently run this in a clj dev.clj, otherwise a namespace with a main method is the same

2020-07-13T21:35:08.361600Z

hello folks,  some help on depstar pls (edited)  clj -C:build -A:build -m hf.depstar.uberjar target/abc.jar -C -m abc.core (edited)  this is giving me Could not locate abc/core__init.class, abc/core.clj or abc/core.cljc on classpath. but I have a src/abc/core.clj with (:gen-class) some clue?

2020-07-13T21:48:59.362200Z

when you say it is giving you that, do you mean when you get that when building the uberjar or trying to run it?

seancorfield 2020-07-13T21:57:56.363Z

Since you're specifying -A:build you don't need to also specify -C:build -- -A means "all" so it already includes the effect of the -C option.

seancorfield 2020-07-13T21:58:19.363500Z

What is your :build alias in your deps.edn @d.ian.b?

2020-07-13T21:59:08.363800Z

:build {:extra-deps {seancorfield/depstar {:mvn/version "1.0.94"}}}

seancorfield 2020-07-13T22:00:20.364600Z

And what exact output are you getting from that clj -A:build command? (I'm assuming the Could not locate... error is from trying to run the JAR?)

2020-07-13T22:01:44.365200Z

Compiling abc.core ...
Execution error (FileNotFoundException) at hf.depstar.uberjar/run$fn (uberjar.clj:331).
Could not locate abc/core__init.class, abc/core.clj or abc/core.cljc on classpath.

Full report at:
/tmp/clojure-5041631337400948497.edn

2020-07-13T22:02:31.365700Z

clj -A:build -m hf.depstar.uberjar target/abc.jar -C -m abc.core

seancorfield 2020-07-13T22:04:51.366900Z

So that says it's compiling norach.core -- which means depstar thinks that is the main class/namespace you told it to compile.

2020-07-13T22:05:40.367100Z

ops

2020-07-13T22:05:41.367300Z

srr

2020-07-13T22:07:17.367700Z

ops

2020-07-13T22:07:31.368Z

it was abc.core

2020-07-13T22:07:47.368300Z

I've tried to anonimize =(

2020-07-13T22:07:49.368500Z

the names

2020-07-13T22:07:57.368700Z

and did it wrong

seancorfield 2020-07-13T22:08:21.369400Z

It really helps if you paste actual commands and actual error messages so you avoid transcription problems.

seancorfield 2020-07-13T22:09:23.370300Z

I just did this:

$ clj -A:new app norach.core
... creates norach.core project ...
$ cd norach.core
$ clj -Sdeps '{:deps {seancorfield/depstar {:mvn/version "RELEASE"}}}' -m hf.depstar.uberjar target/abc.jar -C -m norach.core
Compiling norach.core ...
Building uber jar: target/abc.jar
Processing pom.xml for {norach/norach.core {:mvn/version "0.1.0-SNAPSHOT"}}
$ java -jar target/abc.jar 
Hello, World!

2020-07-13T22:09:33.370500Z

clj -A:build -m hf.depstar.uberjar target/norach.jar -C -m norach.core

Compiling norach.core ...
Execution error (FileNotFoundException) at hf.depstar.uberjar/run$fn (uberjar.clj:331).
Could not locate norach/core__init.class, norach/core.clj or norach/core.cljc on classpath.

Full report at:
/tmp/clojure-5874121970680475144.edn

seancorfield 2020-07-13T22:10:17.371300Z

So that indicates that your deps.edn file is not setup correctly -- so norach/core.clj is not on your classpath.

seancorfield 2020-07-13T22:10:41.371700Z

Can you run this: clj -m norach.core

1
2020-07-13T22:12:07.372800Z

Execution error (FileNotFoundException) at clojure.main/main (main.java:40). Could not locate norach/core__init.class, norach/core.clj or norach/core.cljc on classpath. Full report at: /tmp/clojure-13768805695698659229.edn

2020-07-13T22:12:08.373Z

=(

2020-07-13T22:12:29.373200Z

nope

seancorfield 2020-07-13T22:12:35.373400Z

That confirms it's not a depstar problem -- it's a problem with your project.

2020-07-13T22:12:41.373600Z

thanks

seancorfield 2020-07-13T22:13:08.373800Z

You're sure you have src/norach/core.clj and that file starts with (ns norach.core ...) ?

2020-07-13T22:13:34.374Z

dammit, misstypo

2020-07-13T22:13:39.374200Z

ns norahc.core

2020-07-13T22:13:52.374400Z

dammit

2020-07-13T22:13:54.374600Z

thanksss

1
2020-07-13T22:18:32.375300Z

Thanks @seancorfield 😃

1