Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntelliJ #1

Closed
omidb opened this issue Jan 15, 2015 · 12 comments
Closed

IntelliJ #1

omidb opened this issue Jan 15, 2015 · 12 comments

Comments

@omidb
Copy link

omidb commented Jan 15, 2015

Hi, thanks for the library,

I don't know why IntelliJ is not happy with >> elemnts("something") syntax and it makes is red, it compiles it though.

@ruippeixotog
Copy link
Owner

Hi, thanks for using the library! :)

Yes, I also use IntelliJ and it's very annoying that I have to disable type-aware highlighting when I use scala-scraper. I believe the error boils down to implicit conversions between two functions, which seems to confuse IntelliJ. Here is a minimal example:

object Main extends App {
  // some implicit conversion between functions, doesn't matter its body or type
  implicit def convert(f: Int => Int): (String => String) = { s: String => "a" * f(s.length) }

  val f: (Int => Int) = { n: Int => n * 2 }
  f("hello") // highlighting error
}

It seems a rather strange use case for an implicit conversion by looking at this example alone, but in scala-scraper it allows content extractors like elements to be either directly used as extractors or used as an argument to the full extractor constructor. It is an IntelliJ bug and it should be reported, but I didn't find the time to submit the issue to them yet :(

@omidb
Copy link
Author

omidb commented Jan 16, 2015

maybe you can submit your comment here exactly there, they are very active.

@ruippeixotog
Copy link
Owner

Will do it, probably this weekend.

@ruippeixotog
Copy link
Owner

I have just submitted the issue: https://youtrack.jetbrains.com/issue/SCL-8157

@omidb
Copy link
Author

omidb commented Jan 17, 2015

cool

@ruippeixotog
Copy link
Owner

Hi! Just to let you know that the issue was fixed today on JetBrains' part. It should be available in the version 1.7.70 of the Scala plugin.

Once it is released and I'm able to check it, I'll close this.

@omidb
Copy link
Author

omidb commented Jul 16, 2015

nice!

@omidb omidb closed this as completed Jul 16, 2015
@hkirk
Copy link

hkirk commented Oct 13, 2015

Seems that this is broken again - I'm using scala plugin 1.9.2 and getting errors again. Can anyone confirme this?

Thanks for a nice lib

@pboehm
Copy link

pboehm commented Oct 15, 2015

I can confirm this using IntelliJ IDEA 15 EAP with Scala Plugin 1.9.2.2
intellij_highlighting_problem

@ruippeixotog
Copy link
Owner

I'm using 1.9.2.2 too and I can also confirm that syntax highlighting yields false errors.

I'll find some time this weekend to reduce this to a minimal example and create a new issue in the IntelliJ issue tracker.

@ruippeixotog ruippeixotog reopened this Oct 17, 2015
@ruippeixotog
Copy link
Owner

I've reduced the problem to a minimum example and submitted an issue to the Scala plugin team. As I think they prioritize the issues by the number of voters, it would help very much if you voted up the issue there! (it requires creating an account on their issue tracker...)

ruippeixotog pushed a commit that referenced this issue Jan 24, 2016
add cross build for scala 2.10.5
@ruippeixotog
Copy link
Owner

The Scala plugin issue I submitted was fixed a few days ago. I tested the fixes and most of the syntax highlighting errors were fixed. I expect the fixes should appear in the next version of the plugin for IntelliJ 16 (I'm not so sure about IntelliJ 15). I'm closing this issue, hopefully permanently :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants