Skip to content

shorten types in error messages #8762

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

Open
scabug opened this issue Jul 31, 2014 · 1 comment
Open

shorten types in error messages #8762

scabug opened this issue Jul 31, 2014 · 1 comment
Milestone

Comments

@scabug
Copy link

scabug commented Jul 31, 2014

Compiler errors would be easier to read if they didn't use fully qualified type names. How 'bout a compiler option / scala-ide option to display shorter versions of the types?

We've talked about this in person once or twice, but I don't think I've ever filed an issue.

scala-ide shows me a very long line, with fully qualified type names:

type mismatch;  found   : rx.lang.scala.Observable[nest.sparkle.loader.kafka.AvroKafkaLoader.TaggedBlock[Nothing,Nothing]] => rx.lang.scala.Observable[nest.sparkle.loader.kafka.AvroKafkaLoader.TaggedBlock[K,Nothing]]  required: rx.lang.scala.Observable[nest.sparkle.loader.kafka.AvroKafkaLoader.TaggedBlock[T,U]] => rx.lang.scala.Observable[nest.sparkle.loader.kafka.AvroKafkaLoader.TaggedBlock[K,U]]  

I'd like to see a shorter version of what scalac produces:

type mismatch;  
found: 
  Observable[TaggedBlock[Nothing,Nothing]] => Observable[TaggedBlock[K,Nothing]]  
required: 
  Observable[TaggedBlock[T,U]] => Observable[TaggedBlock[K,U]]  

I find it useful to copy and paste the error message and then manually format it to make it easier to read, but that seems a bit silly..

On rare occasions it would be handy to see the fully qualified names, but I'd guess most people would prefer the short version almost all the time.

@scabug
Copy link
Author

scabug commented Jul 31, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8762?orig=1
Reporter: Lee Mighdoll (mighdoll)
See #8349

@SethTisue SethTisue added this to the Backlog milestone Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants