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

on error messages #5

Open
tiye opened this issue Mar 14, 2020 · 4 comments
Open

on error messages #5

tiye opened this issue Mar 14, 2020 · 4 comments

Comments

@tiye
Copy link

tiye commented Mar 14, 2020

Trying with an new repo, zero commits:

=>> clj -A:release
Downloading: org/clojure/clojure/maven-metadata.xml from https://repo.clojars.org/
Downloading: org/clojure/clojure/maven-metadata.xml from https://repo1.maven.org/maven2/
Downloading: com/cemerick/pomegranate/maven-metadata.xml from https://repo1.maven.org/maven2/
Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}

Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}

POM... minimal-xyz/minimal-cljs-deploy {:mvn/version "0.0.1"}
20-03-14 04:14:39 ChenYongs-MacBook.local ERROR [garamond.git:15] - Command 'git log -1 --format=%H' returned 128!
20-03-14 04:14:39 ChenYongs-MacBook.local ERROR [garamond.git:19] - stderr: fatal: your current branch 'master' does not have any commits yet
Execution error (ExceptionInfo) at garamond.util/exit (util.clj:11).
Exit condition

Full report at:
/var/folders/08/4fbsxdlx1pdbmlgsbqg3ss3m0000gn/T/clojure-8109055626477454885.edn
=>>
{:clojure.main/message
 "Execution error (ExceptionInfo) at garamond.util/exit (util.clj:11).\nExit condition\n",
 :clojure.main/triage
 {:clojure.error/class clojure.lang.ExceptionInfo,
  :clojure.error/line 11,
  :clojure.error/cause "Exit condition",
  :clojure.error/symbol garamond.util/exit,
  :clojure.error/source "util.clj",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type clojure.lang.ExceptionInfo,
    :message "Exit condition",
    :data {:code 128, :message nil},
    :at [garamond.util$exit invokeStatic "util.clj" 11]}],
  :trace
  [[garamond.util$exit invokeStatic "util.clj" 11]
   [garamond.util$exit invoke "util.clj" 3]
   [garamond.util$exit invokeStatic "util.clj" 9]
   [garamond.util$exit invoke "util.clj" 3]
   [garamond.git$handle_error invokeStatic "git.clj" 20]
   [garamond.git$handle_error invoke "git.clj" 14]
   [garamond.git$run_git_command invokeStatic "git.clj" 31]
   [garamond.git$run_git_command invoke "git.clj" 22]
   [garamond.git$run_git_command invokeStatic "git.clj" 24]
   [garamond.git$run_git_command invoke "git.clj" 22]
   [garamond.git$current_sha invokeStatic "git.clj" 50]
   [garamond.git$current_sha invoke "git.clj" 49]
   [garamond.pom$update_pom_BANG_ invokeStatic "pom.clj" 93]
   [garamond.pom$update_pom_BANG_ invoke "pom.clj" 87]
   [garamond.pom$generate_BANG_ invokeStatic "pom.clj" 123]
   [garamond.pom$generate_BANG_ invoke "pom.clj" 117]
   [deps_library.release$pom invokeStatic "release.clj" 59]
   [deps_library.release$pom invoke "release.clj" 55]
   [deps_library.release$main invokeStatic "release.clj" 159]
   [deps_library.release$main doInvoke "release.clj" 103]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$apply invoke "core.clj" 660]
   [deps_library.release$main invokeStatic "release.clj" 169]
   [deps_library.release$main doInvoke "release.clj" 103]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.core$apply invoke "core.clj" 660]
   [deps_library.release$_main invokeStatic "release.clj" 172]
   [deps_library.release$_main doInvoke "release.clj" 171]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.main$main_opt invokeStatic "main.clj" 514]
   [clojure.main$main_opt invoke "main.clj" 510]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "Exit condition",
  :data {:code 128, :message nil}}}

I don't know what's happening here. and BTW why is there a lein-git-version, are we using lein?

and only useful message here is:

.... stderr: fatal: your current branch 'master' does not have any commits yet
@tiye
Copy link
Author

tiye commented Mar 14, 2020

When username password are not set, it's still running with a nil.

Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}

Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}

POM... minimal-xyz/minimal-cljs-deploy {:mvn/version "0.0.1"}
JAR... target/project.jar (thin)
Building thin jar: target/project.jar
Processing pom.xml for {minimal-xyz/minimal-cljs-deploy {:mvn/version "0.0.1"}}
Deploy... clojars
Deploying minimal-xyz/minimal-cljs-deploy-0.0.1 to clojars as nil
Execution error (TransferFailedException) at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon/put (AbstractHttpClientWagon.java:635).
Failed to transfer file: https://clojars.org/repo/minimal-xyz/minimal-cljs-deploy/0.0.1/minimal-cljs-deploy-0.0.1.pom. Return code is: 401, ReasonPhrase: Unauthorized.

Full report at:
/var/folders/08/4fbsxdlx1pdbmlgsbqg3ss3m0000gn/T/clojure-6836176427356659761.edn

Strange that lein-git-version still emits warning after I got a commit.

@tiye
Copy link
Author

tiye commented Mar 14, 2020

@mhuebert
Copy link
Member

Happy to accept a PR to improve how error messages are found/reported. I think in both those cases behaviour is what one would expect and the real error is reported, but one has to scan the stack to find it.

@tiye
Copy link
Author

tiye commented Apr 12, 2020

Not familiar with JVM Clojure, which library do you suggest to display errors?

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