Fork me on GitHub
#clj-kondo
<
2022-08-12
>
Joshua Suskalo15:08:38

Hey @borkdude is it in the cards to update the deps.edn linter to understand sourcehut inferred git urls?

borkdude15:08:11

@suskeyhose issue + optionally PR welcome

Joshua Suskalo15:08:37

Working on the PR at the moment. It looks like there's no tests specifically for checking valid inferred git urls.

borkdude16:08:59

there is a deps.edn linter test section somewhere I think

Joshua Suskalo16:08:10

Yeah, I'm looking at it, but it doesn't explicitly test inferred git urls.

Joshua Suskalo16:08:25

It does test them implicitly as an aside bit during some tests it seems.

Joshua Suskalo16:08:39

But there's no explicit tests for inferred git urls.

borkdude16:08:59

Feel free to add a few

borkdude16:08:14

Most tests are setup as: throw some code at the linter and test the output

Joshua Suskalo16:08:27

Yeah, that's what I'm looking at. Sounds good.

Joshua Suskalo16:08:15

Also looking at the code for it I get why you did it just as simple prefixes, so you wouldn't need a lot of these updates when new ones are added, but I do note the lint is pretty forgiving about incorrect inferred urls.

Joshua Suskalo16:08:26

Maybe that's fine though since it'd be caught by actually trying to build the project.

borkdude16:08:00

There's only 24 hours in a day and so many features to work on :)

borkdude16:08:27

Glad you're helping out with this PR though

Joshua Suskalo16:08:42

Yeah, that's totally fair. And I think this is a fine place to make that compromise.

Joshua Suskalo16:08:29

Does testing work to do multiple tests with the assert-submaps bit or am I better off making two deftests?

Joshua Suskalo16:08:40

Looks like it should work

borkdude18:08:24

Looks good!

Joshua Suskalo18:08:19

awesome, thanks. lmk if I need to make any changes.

borkdude18:08:00

just waiting for tests to pass, looks good

Joshua Suskalo18:08:51

awesome, thanks!

Dumch16:08:18

Does anyone use nvim conjure to run clj-kondo with deps? I have problems adding flow-storm debugger. Details in thread. P.S. fixed

Dumch17:08:42

I have locally :nrepl alias:

{:aliases 
 {:nrepl
  {:extra-deps 
   {nrepl/nrepl {:mvn/version "0.9.0"}
    refactor-nrepl/refactor-nrepl {:mvn/version "3.5.4"}
    cider/cider-nrepl {:mvn/version "0.28.5"}
    criterium/criterium {:mvn/version "0.4.6"}
    com.clojure-goes-fast/clj-java-decompiler {:mvn/version "0.3.1"}
    com.github.jpmonettas/flow-storm-dbg {:mvn/version "2.3.131"}
    com.github.jpmonettas/flow-storm-inst {:mvn/version "2.3.131"}}
   :main-opts  
   ["-m" "nrepl.cmdline" ;"--port" "14563" 
    "--middleware" 
    "[cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]"]}}
It adds flow-storm-dbg . If I ran a project with: clj -M:test:nrepl My REPL doesn't see flow-storm in classpath (can't require it). But clj -Stree -M:test:nrepl returns a tree, where I can see that flow-storm dependencies. Without test alias: clj -M:nrepl it works (I can require flow-storm): :test is an alias is inside clj-kondo deps.edn
:test
           {:extra-deps
            {org.clojure/clojure {:mvn/version "1.9.0"}
             org.clojure/clojurescript {:mvn/version "1.11.54"} ;; for extraction
             cognitect/test-runner
             {:git/url ""
              :sha "cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b"}
             clj-commons/conch {:mvn/version "0.9.2"}
             jonase/eastwood {:mvn/version "1.2.2"}
             borkdude/missing.test.assertions {:mvn/version "0.0.2"}
             babashka/process {:mvn/version "0.1.0"}
             org.clojure/tools.deps.alpha {:mvn/version "0.12.1048"}}
            :extra-paths ["test" "extract"]
            :main-opts ["-m" "cognitect.test-runner"]}
I also found out that it doesn't work with lein if I add flow-storm dependencies inside project.clj (edited)

Dumch19:08:39

user=> (require '[flow-storm.api :as fs-api])
FileNotFoundException Could not locate flow_storm/api__init.class or flow_storm/api.clj
 on classpath. Please check that namespaces with dashes use underscores in the Clojure
file name.  clojure.lang.RT.load (RT.java:463)
user=> (require '[portal.api :as p])
CompilerException java.io.FileNotFoundException: Could not locate clojure/datafy__init.
class or clojure/datafy.clj on classpath., compiling:(portal/runtime.cljc:1:1)
I've also tried to add portal, same errors with not being able to find datafu So the problem is that Clojure 1.9 doesn't have datafu (fyi @borkdude, @UEENNMX0T) I will just add 1.11.0 into my :nrepl alias

๐Ÿ‘ 1
borkdude19:08:58

Good to see it's fixed!

Noah Bogart17:08:53

what's your :test alias look like?

Dumch17:08:58

*Put into thread above

borkdude17:08:03

๐Ÿงต plz

๐Ÿ‘Œ 1