This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # bangalore-clj (5)
- # beginners (77)
- # boot (29)
- # cider (11)
- # clojure (110)
- # clojure-dev (5)
- # clojure-greece (1)
- # clojure-poland (1)
- # clojure-russia (11)
- # clojure-spec (1)
- # clojurescript (143)
- # clojurex (1)
- # core-async (1)
- # css (1)
- # cursive (40)
- # data-science (1)
- # datomic (6)
- # figwheel (4)
- # fulcro (45)
- # immutant (5)
- # off-topic (4)
- # onyx (8)
- # portkey (9)
- # re-frame (112)
- # shadow-cljs (30)
- # spacemacs (3)
I get the following error when trying to start a Repl in Cursive with aot enabled for two namespaces that contain
LinkageError loader constraint violation: when resolving method "com.whatever.KafkaProducerCollector.<init>(Lfranzy/clients/producer/protocols/FranzyProducer;)V" the class loader (instance of clojure/lang/DynamicClassLoader) of the current class, com/whatever/metrics$kafka_producer_collector, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, com/whatever/KafkaProducerCollector, have different Class objects for the type franzy/clients/producer/protocols/FranzyProducer used in the signature com.whatever.metrics/kafka-producer-collector (metrics.clj:16)
I can reproduce it by running
lein clean and starting a new REPL. If I stop the REPL, and start it again then it works. It only fails when booting a REPL and the classes are not compiled yet.
Updating to the newest EAP has rebound my keybindings, is that expected? I knew there were changes, but didn't think it would affect existing users
@danielcompton I wouldn’t have expected that, no - it should have just changed the defaults. Also Cursive shouldn’t have touched that one at all since it’s not a Clojure action.
@snoe Yes, unfortunately those inspections are not configurable - I’ve been meaning to fix that. I’ll try to do that in the next EAP.
@psalaberria002 That’s very strange. Does that also happen if you do
lein clean and then
lein repl on the command line?
I think the error went away after I changed the order of some required namespaces, and added more namespaces to aot. It only happened with Cursive Repl. lein clean lein repl worked fine. If it happens again I will notify here. thanks
Just checked on my laptop and I didn’t have them bound before, so that’s why they were added.
I would only expect the key bindings to be added for new users, not existing ones
@cfleming Another question/observation. It feels to me that optimize imports has been a tough nut to crack. I wonder if https://github.com/cursive-ide/cursive/issues/1592 as a stopgap wouldn’t be useful (simply
(sort (rest require))
@danielcompton Unfortunately that’s hard, since I’m changing the way actions are mapped to the default keymaps. There’s no easy way to say “only do this if there’s nothing bound to that action, or if this action is already bound to something else”
But those are probably a bad choice for the wrapping on OSX though, which is unfortunate.
@snoe Yes, the problem with full optimise imports is that it has a lot of moving parts - rewriting the
ns form with minimal changes is difficult, and once you’re rewriting it then you need a lot of options for formatting it, allowing lists or vectors for different forms etc. Even that issue you mention is harder than just
(sort (rest require)) because of formatting. It is a lot easier though, you’re right.
@danielcompton That’s basically what this change does - it’s only actually modified the 10.5+ one, not your actual keymap.
I guess the issue is that you now have two keys bound to your wrapping commands - what you had before and the new default one, which conflicts with the tab commands. You can unbind that obviously, but it’s not ideal as a default.
@souenzzo Looking at that issue, Cursive doesn’t use
DatatypeConverter anywhere that might get injected into your project, so I’m guessing that use is from your project code. You mention you’re adding the module JVM args, are you adding those to the REPL run config? If so, try adding them to your
project.clj, which will mean they’ll be picked up by the stubs generation as well (and things like
lein run or whatever)
Is there any way to do copy/cut/delete of the current s-expression (the inner-most containing the cursor)?
@danielcompton No, that seems to just cut everything from the cursor to the end of the current s-expression. I've been working with atom and proto-repl for awhile, coming back to cursive now. One of the things I found is that cut/paste of entire expressions works nicely with parinfer (IMHO).
@dave.dixon Yes, I’m afraid that expand selection is really the only option right now.
Someone suggested an “Expand selection by sexps” which would work for this too, one expand by sexp and then select/copy/send to REPL