Fork me on GitHub
#cursive
<
2021-10-04
>
helios09:10:24

Maybe I'm making a stupid mistake. I have a case function which should differentiate between different symbols. IntelliJ is warning me that those symbols can't be resolved, but the documentation of case explains that

The test-constants are not evaluated. They must be compile-time
literals, and need not be quoted.  
I've now switched the (case sym ...) into a (condp = sym ...) but it feels a workaround. Shouldn't case be exempt from trying to resolve things? cc @cfleming

helios09:10:30

this is in clojurescript btw, and also the compiler throws some warnings

--------------------------------------------------------------------------------
  32 |
  33 | (defn explain [sym]
  34 |   foo "foo"
  35 |   bar "bar")
---------^----------------------------------------------------------------------
 Use of undeclared Var my.ns/bar

imre09:10:22

Are you having troubles with case or defn?

imre09:10:17

The defn example sure isn't valid unless you have foo and bar defined globally

emccue11:10:02

(defn explain [sym]
  (case sym
    foo "foo"
    bar "bar"))

imre14:10:09

ah I see now

helios14:10:52

@U3JH98J4R yes sorry i typed it wrong, but you're right 😄

cfleming21:10:55

Yes, Cursive should definitely not complain about that.

roklenarcic13:10:27

Is there a way to disable maven in clojure projects? My build keeps generating pom.xml files and then Intellij complains that Maven and Leiningen cannot both manage the module

cfleming21:10:40

That should only happen if Maven thinks it’s managing the module, it won’t import the pom by default. If you open your Maven toolwindow and remove the project from there it should stop pestering you.

roklenarcic13:10:49

Effectively it disables leiningen on the module, giving precedence to maven

roklenarcic13:10:58

I still have problem where all the leiningen preparation tasks run with a weird PATH. And then I always get Cannot run program "gpg": error=2, No such file or directory. It works fine from command line.

cfleming22:10:00

Does this work if you set the gpg path at Preferences | Build, Execution, Deployment | Build Tools | Leiningen?

roklenarcic12:10:45

yes entering full path here helps