cvogt / cbt

CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Other
488 stars 60 forks source link

better type error messages through scalac-cosmetics #183

Open cvogt opened 8 years ago

cvogt commented 8 years ago

integrating https://github.com/cvogt/scala-cosmetics/tree/temp could help make error messages much nicer

cvogt commented 8 years ago

could probably be a plugin, but not sure

cvogt commented 8 years ago

scalac-cosmetics is very very rough. It used to be based on regexes and I half ported it over to FastParse. The streaming part of it is tricky because we don’t want to delay error messages for parsing

I just pushed a branch temp, which includes some changes I did before Scala Days. https://github.com/cvogt/scala-cosmetics/tree/temp I wrote scalac-cosmetics before I knew I’d be writing CBT. I originally anticipated it as interception stdout/stderr/stdin of sbt and scalac. That actually somewhat worked

One thing I had trouble with when I tried that before Scala Days is hooking scalac-cosmetics onto zinc’s input output streams in CBT. should be totally possible, but I somehow blanked how to do that and ended up showing screen shots instead

architecture-wise I guess ideally we’d turn scalac-cosmetics into a library that a cbt plugin consumes. no need to publish to maven for now, we can just make it a GitDependency

cvogt commented 8 years ago

@rockjam said he wanted to take a look

rockjam commented 8 years ago

@cvogt yep, I will have some time at thursday to start it

cvogt commented 7 years ago

inspiration https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html?utm_content=buffer6d10f&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

cvogt commented 7 years ago

compare https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html