-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix snapshot version support for leiningen #146
base: main
Are you sure you want to change the base?
Conversation
Reviewing that logic again, I guess the Maybe we can remove the need for the |
I see... yeah, as I said, I don't really understand the purpose of Do you want me to remove the assertion? |
Definitely I need to document that. In short, it is because
If you do it, I'll merge the PR, if not, I'll do that later today or tomorrow |
@JohnnyJayJay please let me know if #152 fixes it for you |
It actually doesn't. Result of running Error{:clojure.main/message
"Execution error (ExceptionInfo) at cljnix.utils/throw+ (utils.clj:26).\n\"Maven repo not found\" {:mvn-repos {\"central\" {:url \"https://repo1.maven.org/maven2/\"}, \"clojars\" {:url \"https://repo.clojars.org/\"}}, :repo-name nil, :file #object[sun.nio.fs.UnixPath 0x13879c47 \"/tmp/clj-cache810067721318020057/mvn/com/github/johnnyjayjay/slash/0.5.0-SNAPSHOT/slash-0.5.0-SNAPSHOT.pom\"]}\n\n",
:clojure.main/triage
{:clojure.error/class clojure.lang.ExceptionInfo,
:clojure.error/line 26,
:clojure.error/cause
"\"Maven repo not found\" {:mvn-repos {\"central\" {:url \"https://repo1.maven.org/maven2/\"}, \"clojars\" {:url \"https://repo.clojars.org/\"}}, :repo-name nil, :file #object[sun.nio.fs.UnixPath 0x13879c47 \"/tmp/clj-cache810067721318020057/mvn/com/github/johnnyjayjay/slash/0.5.0-SNAPSHOT/slash-0.5.0-SNAPSHOT.pom\"]}\n",
:clojure.error/symbol cljnix.utils/throw+,
:clojure.error/source "utils.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.ExceptionInfo,
:message
"\"Maven repo not found\" {:mvn-repos {\"central\" {:url \"https://repo1.maven.org/maven2/\"}, \"clojars\" {:url \"https://repo.clojars.org/\"}}, :repo-name nil, :file #object[sun.nio.fs.UnixPath 0x13879c47 \"/tmp/clj-cache810067721318020057/mvn/com/github/johnnyjayjay/slash/0.5.0-SNAPSHOT/slash-0.5.0-SNAPSHOT.pom\"]}\n",
:data
{:mvn-repos
{"central" {:url "https://repo1.maven.org/maven2/"},
"clojars" {:url "https://repo.clojars.org/"}},
:repo-name nil,
:file
#object[sun.nio.fs.UnixPath 0x13879c47 "/tmp/clj-cache810067721318020057/mvn/com/github/johnnyjayjay/slash/0.5.0-SNAPSHOT/slash-0.5.0-SNAPSHOT.pom"]},
:at [cljnix.utils$throw_PLUS_ invokeStatic "utils.clj" 26]}],
:trace
[[cljnix.utils$throw_PLUS_ invokeStatic "utils.clj" 26]
[cljnix.utils$throw_PLUS_ invoke "utils.clj" 24]
[cljnix.utils$mvn_repo_info invokeStatic "utils.clj" 148]
[cljnix.utils$mvn_repo_info doInvoke "utils.clj" 134]
[clojure.lang.RestFn invoke "RestFn.java" 426]
[cljnix.core$missing_mvn_deps$fn__22422 invoke "core.clj" 176]
[clojure.core$map$fn__5950$fn__5951 invoke "core.clj" 2759]
[clojure.core$filter$fn__5977$fn__5978 invoke "core.clj" 2823]
[clojure.core$map$fn__5950$fn__5951 invoke "core.clj" 2759]
[clojure.core$map$fn__5950$fn__5951 invoke "core.clj" 2759]
[clojure.core$filter$fn__5977$fn__5978 invoke "core.clj" 2823]
[clojure.lang.PersistentVector reduce "PersistentVector.java" 418]
[clojure.core$transduce invokeStatic "core.clj" 7025]
[clojure.core$into invokeStatic "core.clj" 7042]
[clojure.core$into invoke "core.clj" 7029]
[cljnix.core$missing_mvn_deps invokeStatic "core.clj" 168]
[cljnix.core$missing_mvn_deps invoke "core.clj" 160]
[cljnix.core$lock_file$fn__22514 invoke "core.clj" 398]
[clojure.core$completing$fn__8558 invoke "core.clj" 7009]
[clojure.core$map$fn__5950$fn__5951 invoke "core.clj" 2757]
[clojure.core$cat$fn__8893 invoke "core.clj" 7819]
[clojure.core$map$fn__5950$fn__5951 invoke "core.clj" 2757]
[clojure.core$map$fn__5950$fn__5951 invoke "core.clj" 2757]
[clojure.core$transduce invokeStatic "core.clj" 7027]
[clojure.core$transduce invoke "core.clj" 7012]
[cljnix.core$lock_file invokeStatic "core.clj" 381]
[cljnix.core$lock_file invoke "core.clj" 372]
[cljnix.core$_main invokeStatic "core.clj" 508]
[cljnix.core$_main doInvoke "core.clj" 503]
[clojure.lang.RestFn applyTo "RestFn.java" 140]
[clojure.lang.Var applyTo "Var.java" 707]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.main$main_opt invokeStatic "main.clj" 515]
[clojure.main$main_opt invoke "main.clj" 511]
[clojure.main$main invokeStatic "main.clj" 665]
[clojure.main$main doInvoke "main.clj" 617]
[clojure.lang.RestFn applyTo "RestFn.java" 140]
[clojure.lang.Var applyTo "Var.java" 707]
[clojure.main main "main.java" 40]],
:cause
"\"Maven repo not found\" {:mvn-repos {\"central\" {:url \"https://repo1.maven.org/maven2/\"}, \"clojars\" {:url \"https://repo.clojars.org/\"}}, :repo-name nil, :file #object[sun.nio.fs.UnixPath 0x13879c47 \"/tmp/clj-cache810067721318020057/mvn/com/github/johnnyjayjay/slash/0.5.0-SNAPSHOT/slash-0.5.0-SNAPSHOT.pom\"]}\n",
:data
{:mvn-repos
{"central" {:url "https://repo1.maven.org/maven2/"},
"clojars" {:url "https://repo.clojars.org/"}},
:repo-name nil,
:file
#object[sun.nio.fs.UnixPath 0x13879c47 "/tmp/clj-cache810067721318020057/mvn/com/github/johnnyjayjay/slash/0.5.0-SNAPSHOT/slash-0.5.0-SNAPSHOT.pom"]}}} With my "fix" (on this PR), it works. I think it's because the Sorry for the late response. I think I even remember testing this 2 weeks ago. |
It's me again, fixing Leiningen stuff as I encounter it.
The current code doesn't support the use of snapshot version from Leiningen, due to the caching being implemented via
missing-mvn-deps
. Here's the error you encounter if you try, for reference:Error
I've spent some time debugging and trying to understand the logic of
mvn-repo-info
, and while I'm not entirely sure I get it, I found that simply setting the:exact-version
of any "missing dep" to"SNAPSHOT"
would circumvent the issue because it results in the desired behaviour.I realise that this might be a hack. Let me know if there is a flaw in what I've done here or if you see other ways to mitigate the issue.