Fork me on GitHub
#cursive
<
2018-06-25
>
caleb.macdonaldblack01:06:16

I’m using cursive and intellij keeps telling me to require a namespace. Every time I do, it adds it then tells me to import again. The namespace alias (eg. [foo.bar :as alias]) is the same as another library that I recently removed. Intellij/cursive still remembers this old library even though I removed it. Cursive also remembers all other requires. I can delete all my requires/imports and cursive does not show issues in my code. If I add something I’ve never imported before I do get errors. I’ve tried invalidating cache and restarting

cfleming07:06:10

@caleb.macdonaldblack That’s really weird, especially that invalidating the caches doesn’t fix it. Invalidating blows all the indexes away and there should be nothing left.

caleb.macdonaldblack07:06:13

Yea it recently started acting up like this. I will trying reinstalling cursive and if that doesnt work intellij too. Just wanted to make sure there wasnt something i was missing first. Thanks

cfleming07:06:32

@caleb.macdonaldblack Before you do that, could you send a screenshot of what you’re seeing?

cfleming07:06:46

You could DM it or mail it if it’s sensitive code.

caleb.macdonaldblack07:06:45

Okay thanks i will do it now

caleb.macdonaldblack07:06:42

@cfleming https://gyazo.com/12fa1af86024ce610835d04286ee4b4c Here I can remove all the imports and I only receive errors for stuff added after the problem started happending

caleb.macdonaldblack07:06:58

And here it remembers the library I removed and I have nothing imported as firebase https://gyazo.com/2588b334f2e8810f5aa7b68fbf375ba5

cfleming07:06:44

In the firebase namespace, how is initialize-app defined?

cfleming07:06:43

Ok, I think I see the problem. The issue is that you already have firebase required using fb

cfleming07:06:01

So what the intention should do there is just change the alias.

caleb.macdonaldblack07:06:08

Thats how I’ve got it working so I dont constantly have that warning

caleb.macdonaldblack07:06:19

If i remove that I still have the issue

caleb.macdonaldblack07:06:01

That firebase library its remembering is not listed in any dependencies or project.clj

caleb.macdonaldblack07:06:11

I used to have it but I removed it

cfleming07:06:17

What’s weird there is that when you type firebase/ini| it doesn’t autocomplete initialize-app

caleb.macdonaldblack07:06:47

Yea init was a function used in the library I removed

caleb.macdonaldblack07:06:07

And it autocompletes even though I have nothing required as firebase

cfleming07:06:37

So if you invalidate the indexes and you’re still getting that, there must be some code somewhere in your project still with that alias defined.

caleb.macdonaldblack07:06:41

The issue is only in namespaces that had firebase imported too

cfleming07:06:58

Invalidating the indexes blows everything away AFAIK (that’s at the IntelliJ level, but I’m pretty sure)

cfleming07:06:32

Do you have two files defining medial-web.core by any chance?

cfleming07:06:08

If you do a Navigate->Namespace… and enter medial-web.core does IntelliJ find another one, perhaps in an output directory or something?

caleb.macdonaldblack07:06:29

Yea I do actually. I am building cljs to a directory not marked as Excluded.

caleb.macdonaldblack07:06:40

I removed that directory and it works now

caleb.macdonaldblack07:06:30

That makes sense too. Thank you for your help!

cfleming07:06:24

I was getting worried 🙂