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

Timeout error corrupts deps.edn #170

Closed
grahamcarlyle opened this issue Jul 7, 2022 · 2 comments
Closed

Timeout error corrupts deps.edn #170

grahamcarlyle opened this issue Jul 7, 2022 · 2 comments

Comments

@grahamcarlyle
Copy link

If I have a timeout error when running antq the relevant deps.edn coordinate is replaced with an error message. I think it would be better to not change the deps.edn to something invalid. The error is already printed and the exit status is non-zero, which is all i think antq needs to do.

e.g.
i can reproduce by invoking the alias

{:deps    {org.clojure/clojure {:mvn/version "1.11.1"}}
 :aliases {:outdated {:replace-deps {}
                      :extra-deps   {com.github.liquidz/antq {:mvn/version "1.9.855"}
                                     org.slf4j/slf4j-simple  {:mvn/version "1.7.36"}}
                      :main-opts    ["-m" "antq.core" "--upgrade" "--force"]}}}

using a very small timeout

ANTQ_DEFAULT_TIMEOUT=1 clj -M:outdated

changes the deps.edn

{:deps    {org.clojure/clojure {:mvn/version #error {
 :cause ""
 :data {:type :antq.util.exception/timeout}
 :via
 [{:type clojure.lang.ExceptionInfo
   :message ""
   :data {:type :antq.util.exception/timeout}
   :at [antq.util.exception$ex_timeout invokeStatic "exception.clj" 7]}]
 :trace
 [[antq.util.exception$ex_timeout invokeStatic "exception.clj" 7]
  [antq.util.exception$ex_timeout invoke "exception.clj" 5]
  [antq.util.async$fn_with_timeout$fn__13034$fn__13059$state_machine__8832__auto____13070$fn__13072 invoke "async.clj" 21]
  [antq.util.async$fn_with_timeout$fn__13034$fn__13059$state_machine__8832__auto____13070 invoke "async.clj" 19]
  [clojure.core.async.impl.ioc_macros$run_state_machine invokeStatic "ioc_macros.clj" 978]
  [clojure.core.async.impl.ioc_macros$run_state_machine invoke "ioc_macros.clj" 977]
  [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invokeStatic "ioc_macros.clj" 982]
  [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invoke "ioc_macros.clj" 980]
  [clojure.core.async.impl.ioc_macros$take_BANG_$fn__8850 invoke "ioc_macros.clj" 991]
  [clojure.core.async.impl.channels.ManyToManyChannel$fn__2802 invoke "channels.clj" 269]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1136]
  [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 635]
  [clojure.core.async.impl.concurrent$counted_thread_factory$reify__2606$fn__2607 invoke "concurrent.clj" 29]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.lang.Thread run "Thread.java" 833]]}}}
 :aliases {:outdated {:replace-deps {}
                      :extra-deps   {com.github.liquidz/antq {:mvn/version #error {
 :cause ""
 :data {:type :antq.util.exception/timeout}
 :via
 [{:type clojure.lang.ExceptionInfo
   :message ""
   :data {:type :antq.util.exception/timeout}
   :at [antq.util.exception$ex_timeout invokeStatic "exception.clj" 7]}]
 :trace
 [[antq.util.exception$ex_timeout invokeStatic "exception.clj" 7]
  [antq.util.exception$ex_timeout invoke "exception.clj" 5]
  [antq.util.async$fn_with_timeout$fn__13034$fn__13059$state_machine__8832__auto____13070$fn__13072 invoke "async.clj" 21]
  [antq.util.async$fn_with_timeout$fn__13034$fn__13059$state_machine__8832__auto____13070 invoke "async.clj" 19]
  [clojure.core.async.impl.ioc_macros$run_state_machine invokeStatic "ioc_macros.clj" 978]
  [clojure.core.async.impl.ioc_macros$run_state_machine invoke "ioc_macros.clj" 977]
  [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invokeStatic "ioc_macros.clj" 982]
  [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invoke "ioc_macros.clj" 980]
  [clojure.core.async.impl.ioc_macros$take_BANG_$fn__8850 invoke "ioc_macros.clj" 991]
  [clojure.core.async.impl.channels.ManyToManyChannel$fn__2802 invoke "channels.clj" 269]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1136]
  [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 635]
  [clojure.core.async.impl.concurrent$counted_thread_factory$reify__2606$fn__2607 invoke "concurrent.clj" 29]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.lang.Thread run "Thread.java" 833]]}}
                                     org.slf4j/slf4j-simple  {:mvn/version #error {
 :cause ""
 :data {:type :antq.util.exception/timeout}
 :via
 [{:type clojure.lang.ExceptionInfo
   :message ""
   :data {:type :antq.util.exception/timeout}
   :at [antq.util.exception$ex_timeout invokeStatic "exception.clj" 7]}]
 :trace
 [[antq.util.exception$ex_timeout invokeStatic "exception.clj" 7]
  [antq.util.exception$ex_timeout invoke "exception.clj" 5]
  [antq.util.async$fn_with_timeout$fn__13034$fn__13059$state_machine__8832__auto____13070$fn__13072 invoke "async.clj" 21]
  [antq.util.async$fn_with_timeout$fn__13034$fn__13059$state_machine__8832__auto____13070 invoke "async.clj" 19]
  [clojure.core.async.impl.ioc_macros$run_state_machine invokeStatic "ioc_macros.clj" 978]
  [clojure.core.async.impl.ioc_macros$run_state_machine invoke "ioc_macros.clj" 977]
  [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invokeStatic "ioc_macros.clj" 982]
  [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invoke "ioc_macros.clj" 980]
  [clojure.core.async.impl.ioc_macros$take_BANG_$fn__8850 invoke "ioc_macros.clj" 991]
  [clojure.core.async.impl.channels.ManyToManyChannel$fn__2802 invoke "channels.clj" 269]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1136]
  [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 635]
  [clojure.core.async.impl.concurrent$counted_thread_factory$reify__2606$fn__2607 invoke "concurrent.clj" 29]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.lang.Thread run "Thread.java" 833]]}}}
                      :main-opts    ["-m" "antq.core" "--upgrade" "--force"]}}}
liquidz added a commit that referenced this issue Jul 7, 2022
@liquidz
Copy link
Owner

liquidz commented Jul 7, 2022

@grahamcarlyle Thanks for your reporting!
I just released fixed version 1.9.859.
Could you try the latest version?

@grahamcarlyle
Copy link
Author

@liquidz That release fixes the problem for me. Thanks!

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