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

Unhandled parse error exception in config: "no conversion to symbol" #2167

Closed
pithyless opened this issue Aug 24, 2023 · 0 comments
Closed
Projects

Comments

@pithyless
Copy link

version

clj-kondo/clj-kondo {:mvn/version "2023.07.13"}

platform

JVM (specifically clojure function via babashka task)

problem

Config had invalid reference to var, but it crashed with exception "no conversion to symbol".

Error reported:

Unexpected error. Please report an issue.
java.lang.IllegalArgumentException: no conversion to symbol
	at clojure.core$symbol.invokeStatic(core.clj:598)
	at clojure.core$symbol.invoke(core.clj:591)
	at clj_kondo.impl.config$eval4623$delayed_cfg__4624$fn__4626.invoke(config.clj:301)
	at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63)
	at clojure.core.protocols$fn__8244.invokeStatic(protocols.clj:136)
	at clojure.core.protocols$fn__8244.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__8204$G__8199__8213.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__8236.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__8236.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__8178$G__8173__8191.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6886)
	at clojure.core$reduce.invoke(core.clj:6868)
	at clj_kondo.impl.config$eval4623$delayed_cfg__4624.invoke(config.clj:300)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$memoize$fn__6946.doInvoke(core.clj:6388)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clj_kondo.impl.config$eval4623$unresolved_symbol_excluded__4636.invoke(config.clj:318)
	at clj_kondo.impl.namespace$reg_unresolved_symbol_BANG_.invokeStatic(namespace.clj:349)
	at clj_kondo.impl.namespace$reg_unresolved_symbol_BANG_.invoke(namespace.clj:345)
	at clj_kondo.impl.linters$lint_var_usage.invokeStatic(linters.clj:290)
	at clj_kondo.impl.linters$lint_var_usage.invoke(linters.clj:209)
	at clj_kondo.core$run_BANG_.invokeStatic(core.clj:218)
	at clj_kondo.core$run_BANG_.invoke(core.clj:56)
	at clj_kondo.main$main.invokeStatic(main.clj:149)
	at clj_kondo.main$main.doInvoke(main.clj:135)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
	at clj_kondo.main$_main$fn__16210.invoke(main.clj:186)
	at clj_kondo.main$_main.invokeStatic(main.clj:186)
	at clj_kondo.main$_main.doInvoke(main.clj:184)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.main$main_opt.invokeStatic(main.clj:514)
	at clojure.main$main_opt.invoke(main.clj:510)
	at clojure.main$main.invokeStatic(main.clj:664)
	at clojure.main$main.doInvoke(main.clj:616)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.main.main(main.java:40)

If you study the stacktrace, there are breadcrumbs to the source of the problem; but it was not obvious to me at first glance when linting a project.

config

{:linters
 {:unresolved-symbol {:exclude [(ns.symbol.without.slash [symbol])]}}}

expected behavior

Perhaps some kind of friendlier message for the user that there is a problem with the config? Even better if we can point to a specific line or section of the config.

@borkdude borkdude added this to Needs triage in clj-kondo via automation Aug 24, 2023
@borkdude borkdude moved this from Needs triage to High priority (next release) in clj-kondo Aug 24, 2023
borkdude added a commit that referenced this issue Aug 25, 2023
clj-kondo automation moved this from High priority (next release) to Done Aug 26, 2023
lambdank pushed a commit to lambdank/clj-kondo that referenced this issue Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
clj-kondo
  
Done
Development

No branches or pull requests

1 participant