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

neil dep upgrade #110

Merged
merged 40 commits into from
Oct 12, 2022
Merged

neil dep upgrade #110

merged 40 commits into from
Oct 12, 2022

Conversation

teodorlu
Copy link
Contributor

@teodorlu teodorlu commented Aug 16, 2022

Proposed API:

neil dep upgrade - upgrades all dependencies to the latest version
neil dep upgrade --dry-run - shows all available upgrades
neil dep upgrade --lib hiccup/hiccup - upgrades only hiccup
neil dep upgrade --dry-run --lib hiccup/hiccup - shows available upgrades for hiccup

Main stuff is working.

Remaining tangible problems/questions:

  1. The ordering of the CLI args seems to impact the option parsing - neilz dep upgrade :lib djblue/portal :dry-run parses differently from neilz dep upgrade :dry-run :lib djblue/portal
  2. Not sure whether we're respecting options like :alias corretly, feedback would be good.
  3. "upgrade" or "update"?
  4. Tests

Remaining fuzzy questions:

Like neil dep add, neil dep upgrade will give us alpha versions. For instance, we always install alpha versions of hiccup:

$ neilz dep versions hiccup/hiccup
:lib hiccup/hiccup :version 2.0.0-alpha2 # this is the one we install
:lib hiccup/hiccup :version 2.0.0-alpha1
:lib hiccup/hiccup :version 1.0.5
:lib hiccup/hiccup :version 1.0.4

We could try to do something about this, for example prefer versions that match #[0-9\.]+. But that's probably best solved in a different issue / PR.

@teodorlu
Copy link
Contributor Author

Working without --dry-run. Example:

$ neilz dep upgrade :dry-run
:lib org.babashka/sci :version 0.2.8 :latest 0.3.32
:lib djblue/portal :version 0.19.2 :latest 0.29.1
$ neilz dep upgrade
$ git st
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   deps.edn

no changes added to commit (use "git add" and/or "git commit -a")
$ git diff
diff --git a/deps.edn b/deps.edn
index a832798..4d7cd5d 100644
--- a/deps.edn
+++ b/deps.edn
@@ -2,7 +2,7 @@
  :deps {org.clojure/clojure {:mvn/version "1.11.1"}
         hiccup/hiccup {:mvn/version "2.0.0-alpha2"}
         hawk/hawk {:mvn/version "0.2.11"}
-        org.babashka/sci {:mvn/version "0.2.8"}
+        org.babashka/sci {:mvn/version "0.3.32"}
         org.clojure/data.json {:mvn/version "2.4.0"}
-        djblue/portal {:mvn/version "0.19.2"}
+        djblue/portal {:mvn/version "0.29.1"}
         }}

@teodorlu teodorlu marked this pull request as ready for review August 16, 2022 19:08
When I run with

  neilz dep upgrade :lib djblue/portal :dry-run

, i get these opts:

  {:deps-file deps.edn, :lib djblue/portal, :dry-run true}

But when I swap the args around like this:

  neilz dep upgrade :dry-run :lib djblue/portal

I don't get a :lib option at all:

  {:deps-file deps.edn, :dry-run true}
@teodorlu
Copy link
Contributor Author

teodorlu commented Aug 16, 2022

Looks like there's some order sensitivity in the CLI parsing. Moving :dry-run around causes different option parsing.

Example (printing opts at the beginning):

$ neilz dep upgrade :lib djblue/portal :dry-run
{:deps-file deps.edn, :lib djblue/portal, :dry-run true}
:lib djblue/portal :version 0.19.2 :latest 0.29.1

$ neilz dep upgrade :dry-run :lib djblue/portal
{:deps-file deps.edn, :dry-run true}
:lib org.babashka/sci :version 0.2.8 :latest 0.3.32
:lib djblue/portal :version 0.19.2 :latest 0.29.1

This isn't what I was expecting! Perhaps I'm misunderstanding the babashka/cli spec.

@teodorlu
Copy link
Contributor Author

teodorlu commented Aug 16, 2022

I'm getting errors when trying to run the existing tests:

$ bb tests

Testing tests

ERROR in (license-list-test) (/home/teodorlu/dev/teodorlu/neil/test/babashka/neil/../../../tests.clj:)
search with matching term prints results
expected: (not-empty (run-license nil "search" "license"))
actual: clojure.lang.ExceptionInfo: ----- Error --------------------------------------------------------------------
Type: java.lang.NullPointerException
Location: /home/teodorlu/dev/teodorlu/neil/./neil:999:36

----- Context ------------------------------------------------------------------
995: curl-get-json
996: (map #(select-keys % [:key :name])))
997: search-results (if search-term
998: (filter #(str/includes?
999: (str/lower-case (:name %))
^---
1000: (str/lower-case search-term))
1001: license-vec)
1002: license-vec)]
1003: (if (empty? search-results)
1004: (binding [out err]

----- Stack trace --------------------------------------------------------------
clojure.string/lower-case -
babashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:999:36
clojure.string/includes? -
babashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:998:35
clojure.core/empty? -
babashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:1003:9
babashka.neil/-main - /home/teodorlu/dev/teodorlu/neil/./neil:1037:3
babashka.neil/-main - /home/teodorlu/dev/teodorlu/neil/./neil:1036:1
babashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:1069:3

{:proc #object[java.lang.ProcessImpl 0x532ac6d1 "Process[pid=64333, exitValue=1]"], :exit 1, :in #object[java.lang.ProcessImpl$ProcessPipeOutputStream 0xa7d1641 "java.lang.ProcessImpl$ProcessPipeOutputStream@a7d1641"], :out "", :err #object[java.lang.ProcessImpl$ProcessPipeInputStream 0x3333f2b2 "java.lang.ProcessImpl$ProcessPipeInputStream@3333f2b2"], :prev nil, :cmd ["./neil" "license" "search" "license"], :type :babashka.process/error}
at babashka.process$check.invokeStatic (process.cljc:105)
babashka.process$check.invoke (process.cljc:95)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$analyze_call$reify__5300.eval (analyzer.cljc:1408)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_2__3026.doInvoke (fns.cljc:85)
clojure.lang.RestFn.invoke (RestFn.java:442)
sci.lang.Var.invoke (lang.cljc:180)
sci.impl.analyzer$return_call$reify__5215.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let$fn__2709.invoke (evaluator.cljc:62)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:53)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.analyzer$return_do$reify__4238.eval (analyzer.cljc:139)
sci.impl.fns$fun$arity_0__3516.invoke (fns.cljc:105)
babashka.impl.clojure.test$test_var_impl$fn__30009.invoke (test.clj:719)
babashka.impl.clojure.test$test_var_impl.invokeStatic (test.clj:719)
babashka.impl.clojure.test$test_var_impl.invoke (test.clj:710)
sci.lang.Var.invoke (lang.cljc:176)
babashka.impl.clojure.test$test_vars$fn__30045$fn__30050.invoke (test.clj:742)
babashka.impl.clojure.test$default_fixture.invokeStatic (test.clj:689)
babashka.impl.clojure.test$default_fixture.invoke (test.clj:685)
babashka.impl.clojure.test$test_vars$fn__30045.invoke (test.clj:742)
babashka.impl.clojure.test$default_fixture.invokeStatic (test.clj:689)
babashka.impl.clojure.test$default_fixture.invoke (test.clj:685)
babashka.impl.clojure.test$test_vars.invokeStatic (test.clj:738)
babashka.impl.clojure.test$test_all_vars.invokeStatic (test.clj:745)
babashka.impl.clojure.test$test_ns.invokeStatic (test.clj:767)
babashka.impl.clojure.test$run_tests$fn__30065.invoke (test.clj:784)
clojure.core$map$fn__5935.invoke (core.clj:2770)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:51)
clojure.lang.Cons.next (Cons.java:39)
clojure.lang.RT.boundedLength (RT.java:1790)
clojure.lang.RestFn.applyTo (RestFn.java:130)
clojure.core$apply.invokeStatic (core.clj:669)
babashka.impl.clojure.test$run_tests.invokeStatic (test.clj:777)
babashka.impl.clojure.test$run_tests.doInvoke (test.clj:777)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.core$apply.invokeStatic (core.clj:669)
babashka.impl.test$contextualize$fn__30076.doInvoke (test.clj:7)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:662)
sci.lang.Var.invoke (lang.cljc:178)
sci.impl.analyzer$return_call$reify__5211.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let$fn__2709.invoke (evaluator.cljc:62)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:53)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_0__3012.doInvoke (fns.cljc:83)
clojure.lang.RestFn.invoke (RestFn.java:408)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_binding_call$reify__5086.eval (analyzer.cljc:1123)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:39)
sci.impl.interpreter$eval_form.invoke (interpreter.cljc:15)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:25)
sci.impl.interpreter$eval_string_STAR_.invokeStatic (interpreter.cljc:61)
sci.core$eval_string_STAR_.invokeStatic (core.cljc:261)
babashka.impl.tasks$exec.invokeStatic (tasks.clj:460)
babashka.impl.tasks$exec.invoke (tasks.clj:460)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_def.invokeStatic (evaluator.cljc:75)
sci.impl.analyzer$analyze_def$reify__4891.eval (analyzer.cljc:573)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:39)
sci.impl.interpreter$eval_string_STAR_.invokeStatic (interpreter.cljc:61)
sci.core$eval_string_STAR_.invokeStatic (core.cljc:261)
babashka.main$exec$fn__31015$fn__31016.invoke (main.clj:955)
babashka.main$exec$fn__31015.invoke (main.clj:955)
babashka.main$exec.invokeStatic (main.clj:945)
babashka.main$main.invokeStatic (main.clj:1052)
babashka.main$main.doInvoke (main.clj:1027)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
babashka.main$_main$f__31086__auto____31096.invoke (main.clj:1091)
clojure.lang.AFn.run (AFn.java:22)
java.lang.Thread.run (Thread.java:829)
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine (PlatformThreads.java:705)
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine (PosixPlatformThreads.java:202)

FAIL in (license-list-test) (/home/teodorlu/dev/teodorlu/neil/test/babashka/neil/../../../tests.clj:)
search for non-existing license prints error
expected: (thrown-with-msg? Exception #"No licenses" (run-license nil "search" "nonExistentLicense"))
actual: #error {
:cause "----- Error --------------------------------------------------------------------\nType: java.lang.NullPointerException\nLocation: /home/teodorlu/dev/teodorlu/neil/./neil:999:36\n\n----- Context ------------------------------------------------------------------\n 995: curl-get-json\n 996: (map #(select-keys % [:key :name])))\n 997: search-results (if search-term\n 998: (filter #(str/includes?\n 999: (str/lower-case (:name %))\n ^--- \n1000: (str/lower-case search-term))\n1001: license-vec)\n1002: license-vec)]\n1003: (if (empty? search-results)\n1004: (binding [out err]\n\n----- Stack trace --------------------------------------------------------------\nclojure.string/lower-case - \nbabashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:999:36\nclojure.string/includes? - \nbabashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:998:35\nclojure.core/empty? - \nbabashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:1003:9\nbabashka.neil/-main - /home/teodorlu/dev/teodorlu/neil/./neil:1037:3\nbabashka.neil/-main - /home/teodorlu/dev/teodorlu/neil/./neil:1036:1\nbabashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:1069:3\n\n"
:data {:proc #object[java.lang.ProcessImpl 0x568487ee "Process[pid=64341, exitValue=1]"], :exit 1, :in #object[java.lang.ProcessImpl$ProcessPipeOutputStream 0x6d6857a7 "java.lang.ProcessImpl$ProcessPipeOutputStream@6d6857a7"], :out "", :err #object[java.lang.ProcessImpl$ProcessPipeInputStream 0x4ff4378 "java.lang.ProcessImpl$ProcessPipeInputStream@4ff4378"], :prev nil, :cmd ["./neil" "license" "search" "nonExistentLicense"], :type :babashka.process/error}
:via
[{:type clojure.lang.ExceptionInfo
:message "----- Error --------------------------------------------------------------------\nType: java.lang.NullPointerException\nLocation: /home/teodorlu/dev/teodorlu/neil/./neil:999:36\n\n----- Context ------------------------------------------------------------------\n 995: curl-get-json\n 996: (map #(select-keys % [:key :name])))\n 997: search-results (if search-term\n 998: (filter #(str/includes?\n 999: (str/lower-case (:name %))\n ^--- \n1000: (str/lower-case search-term))\n1001: license-vec)\n1002: license-vec)]\n1003: (if (empty? search-results)\n1004: (binding [out err]\n\n----- Stack trace --------------------------------------------------------------\nclojure.string/lower-case - \nbabashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:999:36\nclojure.string/includes? - \nbabashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:998:35\nclojure.core/empty? - \nbabashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:1003:9\nbabashka.neil/-main - /home/teodorlu/dev/teodorlu/neil/./neil:1037:3\nbabashka.neil/-main - /home/teodorlu/dev/teodorlu/neil/./neil:1036:1\nbabashka.neil - /home/teodorlu/dev/teodorlu/neil/./neil:1069:3\n\n"
:data {:proc #object[java.lang.ProcessImpl 0x568487ee "Process[pid=64341, exitValue=1]"], :exit 1, :in #object[java.lang.ProcessImpl$ProcessPipeOutputStream 0x6d6857a7 "java.lang.ProcessImpl$ProcessPipeOutputStream@6d6857a7"], :out "", :err #object[java.lang.ProcessImpl$ProcessPipeInputStream 0x4ff4378 "java.lang.ProcessImpl$ProcessPipeInputStream@4ff4378"], :prev nil, :cmd ["./neil" "license" "search" "nonExistentLicense"], :type :babashka.process/error}
:at [babashka.process$check invokeStatic "process.cljc" 105]}]
:trace
[[babashka.process$check invokeStatic "process.cljc" 105]
[babashka.process$check invoke "process.cljc" 95]
[sci.lang.Var invoke "lang.cljc" 176]
[sci.impl.analyzer$return_call$reify__5207 eval "analyzer.cljc" 1205]
[sci.impl.analyzer$analyze_call$reify__5300 eval "analyzer.cljc" 1408]
[sci.impl.analyzer$return_call$reify__5207 eval "analyzer.cljc" 1205]
[sci.impl.evaluator$eval_let invokeStatic "evaluator.cljc" 71]
[sci.impl.analyzer$analyze_let_STAR_$reify__4874 eval "analyzer.cljc" 507]
[sci.impl.evaluator$eval_let invokeStatic "evaluator.cljc" 71]
[sci.impl.analyzer$analyze_let_STAR_$reify__4874 eval "analyzer.cljc" 507]
[sci.impl.fns$fun$arity_2__3026 doInvoke "fns.cljc" 85]
[clojure.lang.RestFn invoke "RestFn.java" 442]
[sci.lang.Var invoke "lang.cljc" 180]
[sci.impl.analyzer$return_call$reify__5215 eval "analyzer.cljc" 1205]
[sci.impl.analyzer$return_do$reify__4236 eval "analyzer.cljc" 139]
[sci.impl.evaluator$eval_try invokeStatic "evaluator.cljc" 123]
[sci.impl.analyzer$analyze_try$reify__4959 eval "analyzer.cljc" 774]
[sci.impl.evaluator$eval_try invokeStatic "evaluator.cljc" 123]
[sci.impl.analyzer$analyze_try$reify__4959 eval "analyzer.cljc" 774]
[sci.impl.evaluator$eval_try invokeStatic "evaluator.cljc" 123]
[sci.impl.analyzer$analyze_try$reify__4959 eval "analyzer.cljc" 774]
[sci.impl.analyzer$return_do$reify__4236 eval "analyzer.cljc" 139]
[sci.impl.evaluator$eval_let invokeStatic "evaluator.cljc" 71]
[sci.impl.analyzer$analyze_let_STAR_$reify__4874 eval "analyzer.cljc" 507]
[sci.impl.analyzer$return_do$reify__4238 eval "analyzer.cljc" 139]
[sci.impl.fns$fun$arity_0__3516 invoke "fns.cljc" 105]
[babashka.impl.clojure.test$test_var_impl$fn__30009 invoke "test.clj" 719]
[babashka.impl.clojure.test$test_var_impl invokeStatic "test.clj" 719]
[babashka.impl.clojure.test$test_var_impl invoke "test.clj" 710]
[sci.lang.Var invoke "lang.cljc" 176]
[babashka.impl.clojure.test$test_vars$fn__30045$fn__30050 invoke "test.clj" 742]
[babashka.impl.clojure.test$default_fixture invokeStatic "test.clj" 689]
[babashka.impl.clojure.test$default_fixture invoke "test.clj" 685]
[babashka.impl.clojure.test$test_vars$fn__30045 invoke "test.clj" 742]
[babashka.impl.clojure.test$default_fixture invokeStatic "test.clj" 689]
[babashka.impl.clojure.test$default_fixture invoke "test.clj" 685]
[babashka.impl.clojure.test$test_vars invokeStatic "test.clj" 738]
[babashka.impl.clojure.test$test_all_vars invokeStatic "test.clj" 745]
[babashka.impl.clojure.test$test_ns invokeStatic "test.clj" 767]
[babashka.impl.clojure.test$run_tests$fn__30065 invoke "test.clj" 784]
[clojure.core$map$fn__5935 invoke "core.clj" 2770]
[clojure.lang.LazySeq sval "LazySeq.java" 42]
[clojure.lang.LazySeq seq "LazySeq.java" 51]
[clojure.lang.Cons next "Cons.java" 39]
[clojure.lang.RT boundedLength "RT.java" 1790]
[clojure.lang.RestFn applyTo "RestFn.java" 130]
[clojure.core$apply invokeStatic "core.clj" 669]
[babashka.impl.clojure.test$run_tests invokeStatic "test.clj" 777]
[babashka.impl.clojure.test$run_tests doInvoke "test.clj" 777]
[clojure.lang.RestFn applyTo "RestFn.java" 139]
[clojure.core$apply invokeStatic "core.clj" 669]
[babashka.impl.test$contextualize$fn__30076 doInvoke "test.clj" 7]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$apply invoke "core.clj" 662]
[sci.lang.Var invoke "lang.cljc" 178]
[sci.impl.analyzer$return_call$reify__5211 eval "analyzer.cljc" 1205]
[sci.impl.evaluator$eval_let$fn__2709 invoke "evaluator.cljc" 62]
[sci.impl.evaluator$eval_let invokeStatic "evaluator.cljc" 53]
[sci.impl.analyzer$analyze_let_STAR_$reify__4874 eval "analyzer.cljc" 507]
[sci.impl.evaluator$eval_let invokeStatic "evaluator.cljc" 71]
[sci.impl.analyzer$analyze_let_STAR_$reify__4874 eval "analyzer.cljc" 507]
[sci.impl.fns$fun$arity_0__3012 doInvoke "fns.cljc" 83]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[sci.lang.Var invoke "lang.cljc" 176]
[sci.impl.analyzer$return_binding_call$reify__5086 eval "analyzer.cljc" 1123]
[sci.impl.evaluator$eval_let invokeStatic "evaluator.cljc" 71]
[sci.impl.analyzer$analyze_let_STAR_$reify__4874 eval "analyzer.cljc" 507]
[sci.impl.interpreter$eval_form invokeStatic "interpreter.cljc" 39]
[sci.impl.interpreter$eval_form invoke "interpreter.cljc" 15]
[sci.impl.interpreter$eval_form invokeStatic "interpreter.cljc" 25]
[sci.impl.interpreter$eval_string_STAR_ invokeStatic "interpreter.cljc" 61]
[sci.core$eval_string_STAR_ invokeStatic "core.cljc" 261]
[babashka.impl.tasks$exec invokeStatic "tasks.clj" 460]
[babashka.impl.tasks$exec invoke "tasks.clj" 460]
[sci.lang.Var invoke "lang.cljc" 176]
[sci.impl.analyzer$return_call$reify__5207 eval "analyzer.cljc" 1205]
[sci.impl.analyzer$return_do$reify__4236 eval "analyzer.cljc" 139]
[sci.impl.evaluator$eval_try invokeStatic "evaluator.cljc" 123]
[sci.impl.analyzer$analyze_try$reify__4959 eval "analyzer.cljc" 774]
[sci.impl.analyzer$return_do$reify__4236 eval "analyzer.cljc" 139]
[sci.impl.evaluator$eval_let invokeStatic "evaluator.cljc" 71]
[sci.impl.analyzer$analyze_let_STAR_$reify__4874 eval "analyzer.cljc" 507]
[sci.impl.evaluator$eval_def invokeStatic "evaluator.cljc" 75]
[sci.impl.analyzer$analyze_def$reify__4891 eval "analyzer.cljc" 573]
[sci.impl.interpreter$eval_form invokeStatic "interpreter.cljc" 39]
[sci.impl.interpreter$eval_string_STAR_ invokeStatic "interpreter.cljc" 61]
[sci.core$eval_string_STAR_ invokeStatic "core.cljc" 261]
[babashka.main$exec$fn__31015$fn__31016 invoke "main.clj" 955]
[babashka.main$exec$fn__31015 invoke "main.clj" 955]
[babashka.main$exec invokeStatic "main.clj" 945]
[babashka.main$main invokeStatic "main.clj" 1052]
[babashka.main$main doInvoke "main.clj" 1027]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 667]
[babashka.main$_main$f__31086__auto____31096 invoke "main.clj" 1091]
[clojure.lang.AFn run "AFn.java" 22]
[java.lang.Thread run "Thread.java" 829]
[com.oracle.svm.core.thread.PlatformThreads threadStartRoutine "PlatformThreads.java" 705]
[com.oracle.svm.core.posix.thread.PosixPlatformThreads pthreadStartRoutine "PosixPlatformThreads.java" 202]]}

FAIL in (new-remote-test) (/home/teodorlu/dev/teodorlu/neil/test/babashka/neil/../../../tests.clj:)
dry run
expected: (= {:template-deps {(quote io.github.rads/neil-new-test-template) {:git/url "https://github.com/rads/neil-new-test-template", :git/tag "1.0.0", :git/sha "e7954c34146fcdc4ab54fa4690bec3ceb9247d05"}}, :create-opts {:template "io.github.rads/neil-new-test-template", :target-dir target-dir, :overwrite true, :name (quote my-scratch/my-scratch)}} (run ":dry-run" "true"))
actual: (not (= {:template-deps {io.github.rads/neil-new-test-template {:git/url "https://github.com/rads/neil-new-test-template", :git/tag "1.0.0", :git/sha "e7954c34146fcdc4ab54fa4690bec3ceb9247d05"}}, :create-opts {:template "io.github.rads/neil-new-test-template", :target-dir "/tmp/my-scratch", :overwrite true, :name my-scratch/my-scratch}} {:template-deps {io.github.rads/neil-new-test-template {:git/url "https://github.com/rads/neil-new-test-template", :git/tag nil, :git/sha nil}}, :create-opts {:template "io.github.rads/neil-new-test-template", :name my-scratch/my-scratch, :target-dir "/tmp/my-scratch", :overwrite true}}))

ERROR in (new-remote-test) (/home/teodorlu/dev/teodorlu/neil/test/babashka/neil/../../../tests.clj:)
template output
expected: (= (slurp (fs/file "test-resources/new/my-scratch/src/scratch.clj")) (slurp (fs/file (str target-dir "/src/scratch.clj"))))
actual: java.io.FileNotFoundException: /tmp/my-scratch/src/scratch.clj (No such file or directory)
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST_FileNotFoundException_constructor_970c509c6abfd3f98898b9a7521945418b90b270 (JNIJavaCallWrappers.java:0)
java.io.FileInputStream.open0 (FileInputStream.java:-1)
java.io.FileInputStream.open (FileInputStream.java:219)
java.io.FileInputStream. (FileInputStream.java:157)
clojure.java.io$fn__11617.invokeStatic (io.clj:229)
clojure.java.io/fn (io.clj:229)
clojure.java.io$fn__11569$G__11523__11576.invoke (io.clj:69)
clojure.java.io$fn__11591.invokeStatic (io.clj:165)
clojure.java.io/fn (io.clj:165)
clojure.java.io$fn__11530$G__11519__11537.invoke (io.clj:69)
clojure.java.io$reader.invokeStatic (io.clj:102)
clojure.java.io$reader.doInvoke (io.clj:86)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.RestFn.applyTo (RestFn.java:132)
clojure.core$apply.invokeStatic (core.clj:669)
clojure.core$slurp.invokeStatic (core.clj:7009)
clojure.core$slurp.doInvoke (core.clj:7009)
clojure.lang.RestFn.invoke (RestFn.java:410)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_call$reify__5211.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let$fn__2709.invoke (evaluator.cljc:62)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:53)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4238.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.analyzer$return_do$reify__4238.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_0__3516.invoke (fns.cljc:105)
babashka.impl.clojure.test$test_var_impl$fn__30009.invoke (test.clj:719)
babashka.impl.clojure.test$test_var_impl.invokeStatic (test.clj:719)
babashka.impl.clojure.test$test_var_impl.invoke (test.clj:710)
sci.lang.Var.invoke (lang.cljc:176)
babashka.impl.clojure.test$test_vars$fn__30045$fn__30050.invoke (test.clj:742)
babashka.impl.clojure.test$default_fixture.invokeStatic (test.clj:689)
babashka.impl.clojure.test$default_fixture.invoke (test.clj:685)
babashka.impl.clojure.test$test_vars$fn__30045.invoke (test.clj:742)
babashka.impl.clojure.test$default_fixture.invokeStatic (test.clj:689)
babashka.impl.clojure.test$default_fixture.invoke (test.clj:685)
babashka.impl.clojure.test$test_vars.invokeStatic (test.clj:738)
babashka.impl.clojure.test$test_all_vars.invokeStatic (test.clj:745)
babashka.impl.clojure.test$test_ns.invokeStatic (test.clj:767)
babashka.impl.clojure.test$run_tests$fn__30065.invoke (test.clj:784)
clojure.core$map$fn__5935.invoke (core.clj:2770)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:51)
clojure.lang.Cons.next (Cons.java:39)
clojure.lang.RT.boundedLength (RT.java:1790)
clojure.lang.RestFn.applyTo (RestFn.java:130)
clojure.core$apply.invokeStatic (core.clj:669)
babashka.impl.clojure.test$run_tests.invokeStatic (test.clj:777)
babashka.impl.clojure.test$run_tests.doInvoke (test.clj:777)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.core$apply.invokeStatic (core.clj:669)
babashka.impl.test$contextualize$fn__30076.doInvoke (test.clj:7)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:662)
sci.lang.Var.invoke (lang.cljc:178)
sci.impl.analyzer$return_call$reify__5211.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let$fn__2709.invoke (evaluator.cljc:62)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:53)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_0__3012.doInvoke (fns.cljc:83)
clojure.lang.RestFn.invoke (RestFn.java:408)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_binding_call$reify__5086.eval (analyzer.cljc:1123)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:39)
sci.impl.interpreter$eval_form.invoke (interpreter.cljc:15)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:25)
sci.impl.interpreter$eval_string_STAR_.invokeStatic (interpreter.cljc:61)
sci.core$eval_string_STAR_.invokeStatic (core.cljc:261)
babashka.impl.tasks$exec.invokeStatic (tasks.clj:460)
babashka.impl.tasks$exec.invoke (tasks.clj:460)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_def.invokeStatic (evaluator.cljc:75)
sci.impl.analyzer$analyze_def$reify__4891.eval (analyzer.cljc:573)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:39)
sci.impl.interpreter$eval_string_STAR_.invokeStatic (interpreter.cljc:61)
sci.core$eval_string_STAR_.invokeStatic (core.cljc:261)
babashka.main$exec$fn__31015$fn__31016.invoke (main.clj:955)
babashka.main$exec$fn__31015.invoke (main.clj:955)
babashka.main$exec.invokeStatic (main.clj:945)
babashka.main$main.invokeStatic (main.clj:1052)
babashka.main$main.doInvoke (main.clj:1027)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
babashka.main$_main$f__31086__auto____31096.invoke (main.clj:1091)
clojure.lang.AFn.run (AFn.java:22)
java.lang.Thread.run (Thread.java:829)
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine (PlatformThreads.java:705)
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine (PosixPlatformThreads.java:202)

ERROR in (new-remote-test) (/home/teodorlu/dev/teodorlu/neil/test/babashka/neil/../../../tests.clj:)
template output
expected: (= (edn/read-string (slurp (fs/file "test-resources/new/my-scratch/deps.edn"))) (edn/read-string (slurp (fs/file (str target-dir "/deps.edn")))))
actual: java.io.FileNotFoundException: /tmp/my-scratch/deps.edn (No such file or directory)
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST_FileNotFoundException_constructor_970c509c6abfd3f98898b9a7521945418b90b270 (JNIJavaCallWrappers.java:0)
java.io.FileInputStream.open0 (FileInputStream.java:-1)
java.io.FileInputStream.open (FileInputStream.java:219)
java.io.FileInputStream. (FileInputStream.java:157)
clojure.java.io$fn__11617.invokeStatic (io.clj:229)
clojure.java.io/fn (io.clj:229)
clojure.java.io$fn__11569$G__11523__11576.invoke (io.clj:69)
clojure.java.io$fn__11591.invokeStatic (io.clj:165)
clojure.java.io/fn (io.clj:165)
clojure.java.io$fn__11530$G__11519__11537.invoke (io.clj:69)
clojure.java.io$reader.invokeStatic (io.clj:102)
clojure.java.io$reader.doInvoke (io.clj:86)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.RestFn.applyTo (RestFn.java:132)
clojure.core$apply.invokeStatic (core.clj:669)
clojure.core$slurp.invokeStatic (core.clj:7009)
clojure.core$slurp.doInvoke (core.clj:7009)
clojure.lang.RestFn.invoke (RestFn.java:410)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_call$reify__5211.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let$fn__2709.invoke (evaluator.cljc:62)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:53)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4238.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.analyzer$return_do$reify__4238.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_0__3516.invoke (fns.cljc:105)
babashka.impl.clojure.test$test_var_impl$fn__30009.invoke (test.clj:719)
babashka.impl.clojure.test$test_var_impl.invokeStatic (test.clj:719)
babashka.impl.clojure.test$test_var_impl.invoke (test.clj:710)
sci.lang.Var.invoke (lang.cljc:176)
babashka.impl.clojure.test$test_vars$fn__30045$fn__30050.invoke (test.clj:742)
babashka.impl.clojure.test$default_fixture.invokeStatic (test.clj:689)
babashka.impl.clojure.test$default_fixture.invoke (test.clj:685)
babashka.impl.clojure.test$test_vars$fn__30045.invoke (test.clj:742)
babashka.impl.clojure.test$default_fixture.invokeStatic (test.clj:689)
babashka.impl.clojure.test$default_fixture.invoke (test.clj:685)
babashka.impl.clojure.test$test_vars.invokeStatic (test.clj:738)
babashka.impl.clojure.test$test_all_vars.invokeStatic (test.clj:745)
babashka.impl.clojure.test$test_ns.invokeStatic (test.clj:767)
babashka.impl.clojure.test$run_tests$fn__30065.invoke (test.clj:784)
clojure.core$map$fn__5935.invoke (core.clj:2770)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:51)
clojure.lang.Cons.next (Cons.java:39)
clojure.lang.RT.boundedLength (RT.java:1790)
clojure.lang.RestFn.applyTo (RestFn.java:130)
clojure.core$apply.invokeStatic (core.clj:669)
babashka.impl.clojure.test$run_tests.invokeStatic (test.clj:777)
babashka.impl.clojure.test$run_tests.doInvoke (test.clj:777)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.core$apply.invokeStatic (core.clj:669)
babashka.impl.test$contextualize$fn__30076.doInvoke (test.clj:7)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:662)
sci.lang.Var.invoke (lang.cljc:178)
sci.impl.analyzer$return_call$reify__5211.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let$fn__2709.invoke (evaluator.cljc:62)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:53)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_0__3012.doInvoke (fns.cljc:83)
clojure.lang.RestFn.invoke (RestFn.java:408)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_binding_call$reify__5086.eval (analyzer.cljc:1123)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:39)
sci.impl.interpreter$eval_form.invoke (interpreter.cljc:15)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:25)
sci.impl.interpreter$eval_string_STAR_.invokeStatic (interpreter.cljc:61)
sci.core$eval_string_STAR_.invokeStatic (core.cljc:261)
babashka.impl.tasks$exec.invokeStatic (tasks.clj:460)
babashka.impl.tasks$exec.invoke (tasks.clj:460)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_def.invokeStatic (evaluator.cljc:75)
sci.impl.analyzer$analyze_def$reify__4891.eval (analyzer.cljc:573)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:39)
sci.impl.interpreter$eval_string_STAR_.invokeStatic (interpreter.cljc:61)
sci.core$eval_string_STAR_.invokeStatic (core.cljc:261)
babashka.main$exec$fn__31015$fn__31016.invoke (main.clj:955)
babashka.main$exec$fn__31015.invoke (main.clj:955)
babashka.main$exec.invokeStatic (main.clj:945)
babashka.main$main.invokeStatic (main.clj:1052)
babashka.main$main.doInvoke (main.clj:1027)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
babashka.main$_main$f__31086__auto____31096.invoke (main.clj:1091)
clojure.lang.AFn.run (AFn.java:22)
java.lang.Thread.run (Thread.java:829)
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine (PlatformThreads.java:705)
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine (PosixPlatformThreads.java:202)

ERROR in (license-add-test) (/home/teodorlu/dev/teodorlu/neil/test/babashka/neil/../../../tests.clj:)
Uncaught exception, not in assertion.
expected: nil
actual: clojure.lang.ExceptionInfo: License 'epl-2.0' has no body text.

{:proc #object[java.lang.ProcessImpl 0x387737c4 "Process[pid=64469, exitValue=1]"], :exit 1, :in #object[java.lang.ProcessImpl$ProcessPipeOutputStream 0x677abd5e "java.lang.ProcessImpl$ProcessPipeOutputStream@677abd5e"], :out "", :err #object[java.lang.ProcessImpl$ProcessPipeInputStream 0x751f7e8f "java.lang.ProcessImpl$ProcessPipeInputStream@751f7e8f"], :prev nil, :cmd ["./neil" "license" "add" "epl-2.0" ":file" "/tmp/neil/LICENSE.txt"], :type :babashka.process/error}
at babashka.process$check.invokeStatic (process.cljc:105)
babashka.process$check.invoke (process.cljc:95)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$analyze_call$reify__5300.eval (analyzer.cljc:1408)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_2__3026.doInvoke (fns.cljc:85)
clojure.lang.RestFn.invoke (RestFn.java:442)
sci.lang.Var.invoke (lang.cljc:180)
sci.impl.analyzer$return_call$reify__5215.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_do.invokeStatic (evaluator.cljc:271)
sci.impl.analyzer$return_do$reify__4240.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_0__3516.invoke (fns.cljc:105)
babashka.impl.clojure.test$test_var_impl$fn__30009.invoke (test.clj:719)
babashka.impl.clojure.test$test_var_impl.invokeStatic (test.clj:719)
babashka.impl.clojure.test$test_var_impl.invoke (test.clj:710)
sci.lang.Var.invoke (lang.cljc:176)
babashka.impl.clojure.test$test_vars$fn__30045$fn__30050.invoke (test.clj:742)
babashka.impl.clojure.test$default_fixture.invokeStatic (test.clj:689)
babashka.impl.clojure.test$default_fixture.invoke (test.clj:685)
babashka.impl.clojure.test$test_vars$fn__30045.invoke (test.clj:742)
babashka.impl.clojure.test$default_fixture.invokeStatic (test.clj:689)
babashka.impl.clojure.test$default_fixture.invoke (test.clj:685)
babashka.impl.clojure.test$test_vars.invokeStatic (test.clj:738)
babashka.impl.clojure.test$test_all_vars.invokeStatic (test.clj:745)
babashka.impl.clojure.test$test_ns.invokeStatic (test.clj:767)
babashka.impl.clojure.test$run_tests$fn__30065.invoke (test.clj:784)
clojure.core$map$fn__5935.invoke (core.clj:2770)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:51)
clojure.lang.Cons.next (Cons.java:39)
clojure.lang.RT.boundedLength (RT.java:1790)
clojure.lang.RestFn.applyTo (RestFn.java:130)
clojure.core$apply.invokeStatic (core.clj:669)
babashka.impl.clojure.test$run_tests.invokeStatic (test.clj:777)
babashka.impl.clojure.test$run_tests.doInvoke (test.clj:777)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.core$apply.invokeStatic (core.clj:669)
babashka.impl.test$contextualize$fn__30076.doInvoke (test.clj:7)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:662)
sci.lang.Var.invoke (lang.cljc:178)
sci.impl.analyzer$return_call$reify__5211.eval (analyzer.cljc:1205)
sci.impl.evaluator$eval_let$fn__2709.invoke (evaluator.cljc:62)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:53)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.fns$fun$arity_0__3012.doInvoke (fns.cljc:83)
clojure.lang.RestFn.invoke (RestFn.java:408)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_binding_call$reify__5086.eval (analyzer.cljc:1123)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:39)
sci.impl.interpreter$eval_form.invoke (interpreter.cljc:15)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:25)
sci.impl.interpreter$eval_string_STAR_.invokeStatic (interpreter.cljc:61)
sci.core$eval_string_STAR_.invokeStatic (core.cljc:261)
babashka.impl.tasks$exec.invokeStatic (tasks.clj:460)
babashka.impl.tasks$exec.invoke (tasks.clj:460)
sci.lang.Var.invoke (lang.cljc:176)
sci.impl.analyzer$return_call$reify__5207.eval (analyzer.cljc:1205)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_try.invokeStatic (evaluator.cljc:123)
sci.impl.analyzer$analyze_try$reify__4959.eval (analyzer.cljc:774)
sci.impl.analyzer$return_do$reify__4236.eval (analyzer.cljc:139)
sci.impl.evaluator$eval_let.invokeStatic (evaluator.cljc:71)
sci.impl.analyzer$analyze_let_STAR_$reify__4874.eval (analyzer.cljc:507)
sci.impl.evaluator$eval_def.invokeStatic (evaluator.cljc:75)
sci.impl.analyzer$analyze_def$reify__4891.eval (analyzer.cljc:573)
sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:39)
sci.impl.interpreter$eval_string_STAR_.invokeStatic (interpreter.cljc:61)
sci.core$eval_string_STAR_.invokeStatic (core.cljc:261)
babashka.main$exec$fn__31015$fn__31016.invoke (main.clj:955)
babashka.main$exec$fn__31015.invoke (main.clj:955)
babashka.main$exec.invokeStatic (main.clj:945)
babashka.main$main.invokeStatic (main.clj:1052)
babashka.main$main.doInvoke (main.clj:1027)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
babashka.main$_main$f__31086__auto____31096.invoke (main.clj:1091)
clojure.lang.AFn.run (AFn.java:22)
java.lang.Thread.run (Thread.java:829)
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine (PlatformThreads.java:705)
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine (PosixPlatformThreads.java:202)

Testing babashka.neil.version-test

Ran 17 tests containing 44 assertions.
2 failures, 4 errors.
Tests failed

@rads
Copy link
Collaborator

rads commented Aug 16, 2022

@teodorlu: I think you may be hitting the GitHub API rate limit. Trying again with a VPN or waiting a bit might fix the issue.

@rads
Copy link
Collaborator

rads commented Aug 16, 2022

I created a new issue with a possible workaround for the rate limit: #111

@rads
Copy link
Collaborator

rads commented Aug 16, 2022

The tests are passing for me locally:

src/teodorlu-neil(dep-upgrade) $ bb tests

Testing tests

Testing babashka.neil.version-test

Ran 17 tests containing 47 assertions.
0 failures, 0 errors.

@teodorlu
Copy link
Contributor Author

Nice! I'll try again later, possibly double check the Github tokens.

@teodorlu
Copy link
Contributor Author

teodorlu commented Aug 17, 2022

It would also be good if we can enable + document how to run a single test.

Running the whole test suite takes time, and I'm mostly interested in the new tests I've written.

@rads
Copy link
Collaborator

rads commented Aug 17, 2022

@teodorlu: We have an issue to split the tests into separate files: #85

Then these namespaces can be selected individually with our existing test runner:

bb tests :nses '[babashka.neil.version-test]'

@teodorlu
Copy link
Contributor Author

teodorlu commented Aug 21, 2022

Just wanted to say that running tests in a single namespace for neil dep upgrade with bb tests :nses '[babashka.neil.dep-upgrade-test]' has improved my experience working with tests significantly (a hundredfold?).

Before: half a minute to run tests, didn't see what was wrong. After: can run only my own tests in a second, easily find out where stuff fails.

Now I'm actually enjoying working on the tests 😄

This test helper now supports the args used by `dep_upgrade_test`, which
expected to set the :deps-file and a :dry-run flag.

It may be preferred to leave this as is, and instead build up the neil
command as a string (rather than support neil's args in this test helper).
@russmatney
Copy link
Contributor

I opened a PR against this branch here teodorlu#1 that fixes the tests and linter errors.

I can also take a shot at merging against the latest to deal with conflicts as well, feel free to ping me if that'd be a help

@borkdude
Copy link
Contributor

borkdude commented Oct 12, 2022

I tested locally and found this:

  • It changes git/url + git/sha to mvn coordinates, that may be a bug
  • Aliases aren't upgraded - should we?
  • I would like update and upgrade to be synonyms with the same meaning because I always mix these up.

Also adds a few example usages.
This refactors this test somewhat - the `let` vars were pulled into
defs, which makes evaling commands in the tests themselves much easier.

A new test was added to be sure specifying a single `:lib` only updates
that dep, leaving others as they are.

The existing tests were also both using dry-run - they've been
refactored to run without --dry-run to be sure things are actually
working, except where dry run is being tested explicitly.
@teodorlu
Copy link
Contributor Author

It changes git/url + git/sha to mvn coordinates, that may be a bug

Good catch - thanks!

@teodorlu teodorlu changed the title neil dep upgrade - proof of concept neil dep upgrade Oct 12, 2022
Writes a few tests to be sure upgrade :git/sha based deps work as
expected (i.e. they should not move to :mvn deps).
Adds an additional upgrade test to be sure updating a single lib also
maintains the same :git/sha style.

Refactors dep-upgrade to check the current dep style (:git/sha vs
:mvn/version) so that the same style is used to perform the upgrade.
Introduces a few private helpers supporting the upgrade function.
Rather than just return nothing in the success case, prints a line
indicating which deps are being updated.
I noticed the :git/tag and :git/sha usage in neil's own deps.edn -
relying on :git/url seems problemmatic in that case, so I'm switching to
checking for only a :git/sha.
@russmatney
Copy link
Contributor

The last few commits extend the test coverage to cover single :lib usage, and adds tests + refactors to maintain :git vs :mvn style deps. It also adds update as an alternate for upgrade, so neil dep update now performs the same features.

Aliases are not yet supported - i'll take a shot at that next.

One thing I'm not confident on is :git/tag usage - i'm not 100% on the expectation for upgrading a dep in the case (i.e. should the tag play into it at all?):

{:deps {io.github.seancorfield/deps-new {:git/tag "v0.4.13" :git/sha "879c4eb"}}}

The behavior for now assumes you want the latest git sha, so you end up with:

{:deps {io.github.seancorfield/deps-new 
               {:git/url "https://github.com/seancorfield/deps-new"
                :git/sha "7a1e13ca57492ad1c54eec1613bebe9aaec004c5"}}}

That's probably right for now - I'm not sure why both the tag and sha are present in this case (pulled from neil's deps.edn).

@borkdude
Copy link
Contributor

What we could do is get the latest tags from github and upgrade to that one?

@russmatney
Copy link
Contributor

is there already support for adding a dep at a specific tag?

@borkdude
Copy link
Contributor

borkdude commented Oct 12, 2022

No, but we could add a :latest-tag option for dep add and then use that here? I'm also fine with supporting that later if you want to keep this PR small for now.

@russmatney
Copy link
Contributor

it's probably not too bad to go for now. i'll assume in the :git/tag case we want to ignore the :git/sha in the dep description (i.e. prefer to check for :git/tag first). Hopefully github's api is reasonable to fetch tags with (i can probably model it off the way the shas are fetched).

Tho i am slightly wary - is a "latest" tag always a good one (vs something tagged for other reasons)? I suppose for 99% of cases it's probably the right thing.

@borkdude borkdude merged commit 2becd07 into babashka:main Oct 12, 2022
@teodorlu teodorlu deleted the dep-upgrade branch October 12, 2022 21:19
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

Successfully merging this pull request may close these issues.

None yet

4 participants