lambdaisland / kaocha-cucumber

Cucumber support for Kaocha
Eclipse Public License 1.0
38 stars 11 forks source link

Can't get Kaocha Cucumber along with IntelliJ Cursive #19

Closed Terbiy closed 1 year ago

Terbiy commented 1 year ago

Hello! Thank you for Kaocha Cucumber, the tool which I enjoy. I want my experience to be even better, and thus want to have a good editor support. Unfortunately, for now, it's not the case for IntelliJ Cursive. Could you please help me resolve my problems, or at least to think of them alongside me?🙂

  1. *.feature files do not know about Clojure implementation and keep proposing me to create a dedicated Java file. изображение

  2. Given, When, And, But, and Then are misinterpreted as dependencies from Java. Parameters are considered as something not resolved. изображение изображение

  3. Attempts to ask Cursive treat them as defn or even as none fail. изображение изображение

alysbrooks commented 1 year ago

Glad you like it! I haven't used Cursive, and I'm not sure any of our frequent Kaocha contributors do either (Kaocha being the main Lambda Island with a significant number of Cucumber tests).

  1. Presumably the Cucumber plugin doesn't understand Clojure syntax. Can you specify a Maven artifact or a JAR file that contains the step definitions? It would be a little awkward if you were in the process of editing step definitions (since you'd have to create a JAR or run mvn install), but at least it would silence the unnecessary warnings.
  2. Does using :refer for the specific symbols instead of :refer :all solve the issue?
  3. I'm not sure how this feature of IntelliJ works exactly. Does it usually work for symbols it can't resolve?
Terbiy commented 1 year ago

Thank you for such a rapid reply. When trying to implement your proposal, I came to the conclusion that resolving these problems would require the participation of three parties: you, IntelliJ developers and Cursive developers.🤦‍♂️

  1. Hmm, it seems like I discovered no place to specify Maven artifact. I use the default IntelliJ plugins: Cucumber for Java and Gherkin. They provide no settings. However, when writing this message, I could find potentially useful plugin created for Kaocha Cucumber: Cucumber for Clojure.😃 The problem is that it's abandoned, but I'll try to look into it.
  2. This is precisely the way I use it: [lambdaisland.cucumber.dsl :refer [And But Then]]. And even there I receive a polite proposal to import them.
  3. Sorry, I forgot to attach the link yesterday. As I understood it, yes, it's described as a solution in the dedicated article. I'll write an issue in the Cursive IDE project.
alysbrooks commented 1 year ago

Yeah, I'm not sure it's something we can fix on our end.

  1. Yeah, I suspect you'd need a plugin like that to get the same level of integration you get with Cucumber in Java.

  2. I notice there's also a green line under lambdaisland. Is Cursive not picking up the library?

  3. Filing an issue or going to a Cursive-specific forum (maybe the Clojurians Slack has a channel?) is probably your best bet.

Terbiy commented 1 year ago

Regarding the second one, it's a local spellcheck. It doesn't know the lambdaisland word: Typo: In word 'lambdaisland'.🙂

Then I suggest closing this issue. It seems like trying to restore the plugin and communicating with Cursive creators is the way to work with these problems, not fixing the Kaocha Cucumber somehow.

alysbrooks commented 1 year ago

I suspect if there's something we can do on our end, it's adding documentation or pointing people to the relevant plugin(s).