-
Notifications
You must be signed in to change notification settings - Fork 21
reflectiveCalls warning is not clear on where to look in API #9631
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9631?orig=1 |
@heathermiller said: It says "value scala.language.reflectiveCalls"... That's explicitly telling you that it's a value and that it can be found in the scala.language object. You link to trait "scala.languageFeature.reflectiveCalls" which is not the path that the warning instructs one to consult. This is the same error message for all language imports (HKT, implicit conversions, etc), and in years of it being in use, so far I can't say that I've heard any complaints that this warning not precise enough. It actually is quite precise. Therefore, I can only recommend to close this issue, as it appears that the reporter did not notice the word value in the warning. |
@som-snytt said: Autocomplete of an import shows the Scaladoc, but once I've entered the source text, my hover doesn't show Scaladoc for imports. I have to F3 (open declaration) on the import to get nice Scaladoc hovers. ctl-shift-T also opens the language object, but one might think naively that language is a package and reflectiveCalls is an object. Wording such as, "See the reflectiveCalls value member of the scala.language object," may be warranted. I'm not suggesting Eclipse could display a direct link in the error message, which would be an amazing feat of something. |
@JustinPihony said: As to the origin of this issue, it comes from a customer who was exactly confused as I specified. Take that with what A. P. Mark said, along with this StackOverflow question and there are indeed cases where people have brought this up. And, those are just the cases that are public. It is entirely possible that there many more cases where the dev finally figured it out after wasting undue time simply finding the correct documentation. Again, erring on the side of clarity couldn't hurt here. *I realize that this is true of all language imports, I simply chose one for specificity. |
@heathermiller said (edited on Jan 27, 2016 3:54:17 PM UTC): Furthermore, you make the point that you just want to search "reflectiveCalls" and ignore the path. I don't think it's a wise way to use Scala or Java to totally ignore paths when trying to debug code. RE: A.P Marki – I don't think this is an issue of tooling. This is simply an issue of someone overlooking the word "value" in the explicit instructions in the warning. This is a bug report that seems to request that we change our warnings so that people don't have to think about paths, which is not the right thing to do in my opinion. |
Apparently, the customer was not always right. |
Uh oh!
There was an error while loading. Please reload this page.
When you have code that results in a structural type member, you get the below warning:
Specifically take note of :
See the Scala docs for value scala.language.reflectiveCalls for a discussion
The problem is that if you go to the reflectiveCalls trait, there is no documentation. Whereas if you go to the language object and look at it's reflectiveCalls val, then you will see the documentation.
The natural inclination from the above warning is to review the trait, so either the trait needs to contain the documentation, or the warning needs to be made more clear as to the location of the documentation.
The text was updated successfully, but these errors were encountered: