typelevel/scala

Report Typelevel Scala version at console welcome screen

soronpo opened this issue · 9 comments

If #135 comes through, I think it would be good if the Typelevel Scala version number would be displayed in the console welcome screen alongside the origin Lightbend version (and the fact that this is Typelevel Scala compiler).

I agree.

A PR for this should target typelevel/scala, because it really doesn't make sense for it to be a PR against scala/scala.

I think it would be good to have that version information available next to the Lightbend scala version.

Lightbend console

Welcome to Scala version 2.12.1 (OpenJDK 64-Bit Server VM, Java 1.8.0_121).
Type in expressions to have them evaluated.

Typelevel console (assuming 20170420 is the version number for TLS)

Welcome to Typelevel Scala version 2.12.1-20170420 (OpenJDK 64-Bit Server VM, Java 1.8.0_121).
Type in expressions to have them evaluated.

Possible implementation direction:
https://github.com/scala/scala/blob/05016d9035ab9b1c866bd9f12fdd0491f1ea0cbb/src/compiler/scala/tools/nsc/Properties.scala#L20

Any volunteers for this should PR against typelevel/scala (ie. this repo) rather than the usual scala/scala.

The form of the version will actually be 2.12.2-bin-typelevel-20170420 (-bin has special meaning for SBT). I think we probably just need a version suffix.

Is this what you think should be?

Welcome to Scala version 2.12.2-bin-typelevel-20170420 (OpenJDK 64-Bit Server VM, Java 1.8.0_121).
Type in expressions to have them evaluated.

Also, where in TLS sources do we expect to find the number 20170420?

I would imagine we would use the same mechanism that provides the existing parts of the version number? Presumably it's injected from the build somehow?

I tried to find this out on the scala/contributors gitter. I was referred to scala@934a314
Is a "quick and dirty" PR acceptable for the coming release, if I will create a proper PR next month?

"Quick and dirty" is just fine :-)

This is fixed in the latest TLS releases.