Fork me on GitHub
#cursive
<
2020-05-11
>
mhuebert10:05:04

any ideas as to what can cause this assoc to not resolve to cljs.core/assoc for indentation purposes? indentation cannot be configured in any way - it will create an entry for example.core/assoc in Project.xml but still will not format the form according to any setting (not example.core/assoc nor cljs.core/assoc)

mhuebert10:05:44

if I jump-to-source, it shows options for cljs.core

cfleming11:05:48

@U050RLRRQ I think the problem is that that assoc is actually resolving to two places, but both in the cljs.core namespace. It looks like your viz dep actually contains cljs.core.

cfleming11:05:12

The indentation behaviour is clearly funky despite that, but I think that’s the problem.

mhuebert11:05:15

@U0567Q30W thanks, that was the issue.

mhuebert11:05:54

appears they shipped their resources/public dir with the whole compile result

cfleming11:05:54

Great. Tomorrow I’ll fix the indentation weirdness (it shouldn’t matter that it resolves to two places if the FQN is the same)

mhuebert11:05:12

sounds great

thheller11:05:34

for extra fun effect there are some libraries that contain multiple versions of cljs.core, not just one 😛

thheller11:05:16

classpath indexing definitely reveals quite a few unclean packages

thheller11:05:35

thats the new logic I added, maybe cursive should do something along those lines too

thheller11:05:07

ie. detect a */cljs/core.js file and remove the entire dir that is in if found

thheller11:05:25

seems to work for most bad jars I have encountered

cfleming21:05:52

That’s… freaky. Is that mostly misconfigured builds producing those jars? i.e. it’s not intentional for any reason?

thheller22:05:32

a lot of people use resources/ as the output directory so yeah all sorts of crap is accidentally included. can't think of a reason why anyone would want to include a pre-compiled cljs/core.js since nothing will ever use it

thheller22:05:31

except maybe cljs itself of course but thats why I'm looking for */cljs/core.js not cljs/core.js or cljs/core.cljs at the root

cfleming22:05:41

Yeah, in this case I suspect that core.cljc was accidentally included since Cursive wouldn’t index cljs/core.js.

thheller22:05:52

yeah, normal CLJS output always contains something/cljs/core.js in the same dir as something/cljs/core.cljs

thheller22:05:17

but there is at least one legit case where /cljs/core.cljs is legit and not accidental, ie. cljs-bean.from.cljs.core

thheller22:05:28

so can't look for cljs/core.cljs to identify "bad" output

thheller22:05:03

just using the */cljs/core.js as an identifier to detect bad directories and quarantine everything in that dir

cfleming23:05:53

Ok, thanks - that does sound like something I could check with Cursive and warn about.

Jay Chamberlin13:05:17

How can I re-configure the indentation for a custom macro after it has been configured once? I'm not getting the option in the alt+enter menu anymore and I don't see it in Settings->Editor->Code Style->Clojure under Form Parameters for the project

folcon23:05:04

Is anyone else experiencing an issue using deps.edn where cursive repeatedly keeps losing track of the test folder? I keep having to mark my test sources root…

cfleming23:05:00

Which Cursive version are you using? I changed this recently (actually, a while ago now, I think) so that it should remember folders that you’ve marked as tests. It will also automatically mark test roots from any :extra-paths in the test alias.

folcon00:05:42

1 sec, just checking: 1.9.2-eap2-2020.1

folcon00:05:03

btw, that memory prob is resurfacing, I think there’s some relation with number of repls started/stopped over time?

cfleming00:05:23

Ok, you should definitely have that fix.

cfleming00:05:36

Sorry, I haven’t had a chance to look at the memory thing, I’ll try to do that soon.

folcon00:05:46

That’s fine, I’m managing 😃