Open conan opened 9 years ago
All those exceptions are Cursive trying to work out if it's a Clojure file so it can leave it alone. It's very strange. Is the Ruby project open source?
No, it's our internal chef stuff I'm afraid. The file is a template of an EDN file, though.
It's stuff that looks like:
{:port <%= node.api[:apiPort] %>}
It actually contains more keys with more chef attributes and variables, but I can't paste it here, sorry.
Ok, do you know of an open source chef project I could try to reproduce it on?
Ah OK, I think I've figured it out. These files are chef template files, which mean they're used as the basis for other files - in this case, configuration files ending .conf
. I can reproduce the problem by creating a new file (anywhere, even in an existing Clojure project) that contains .conf.erb
in its filename (I guess it's because I have *.conf
associated with Clojure editors). Make the file look like an EDN file but with a chef attribute, for example:
{:hi <%= @there %>}
What I don't get is why *.conf
matches something like test.conf.erb
and tries to bring in Cursive.
(I've got the Ruby plugin and Chef integration plugin installed)
The upshot is that it's caused by the fact that I have .conf
files associated with Clojure, so it won't happen for people that don't have weird associations like that. That said, it doesn't seem like such a crazy thing to do - working with EDN files and wanting to use Cursive's excellent tooling for them, too.
Yeah, that sounds like a reasonable thing to do. I'll try to reproduce based on that description, thanks. You're right that *.conf
shouldn't match *.conf.erb
- I don't know what's up with that. It sounds like IntelliJ might be getting confused there somehow.
I'll see if I can find a workaround in the File Types and post back here if I do.
I've just imported a chef (Ruby) project into Intellij, but when I try to edit
.erb
files (associated with the RHTML editor apparently), I can't - the first character or space I type throws a Cursive AssertionError. I don't know why Cursive has anything to do with these files - how can I stop Cursive being involved for non-Clojure files?Here are a couple of stacktraces (I get a different one depending on which key I press):