dwijnand / scala-runners

Scala Runners: a Coursier-based alternative implementation
Apache License 2.0
43 stars 5 forks source link

`scala -212` isn't giving me 2.12.12 #23

Closed SethTisue closed 4 years ago

SethTisue commented 4 years ago
% scala -212
Welcome to Scala 2.12.11 (OpenJDK 64-Bit Server VM, Java 1.8.0_262).
Type in expressions for evaluation. Or try :help.
[info] started at Wed Jul 29 17:07:30 PDT 2020

?

dwijnand commented 4 years ago

Run it with -v to get the Coursier invocation, so we can tell if its an issue with the Coursier command invoked or within Coursier itself. I suspect the latter.

For the record, "it works for me":

$ scala -212
Welcome to Scala 2.12.12 (OpenJDK 64-Bit Server VM, Java 11.0.6).
Type in expressions for evaluation. Or try :help.

scala> :quit
SethTisue commented 4 years ago
% scala -212 -v
# Executing command line:
cs
launch
scala:2.12+
-J
-Dscala.repl.info=true
--no-default
-r=central
--no-default
-r=central
--
-deprecation
-feature
-unchecked
-Xlint:-unused,_

Welcome to Scala 2.12.11 (OpenJDK 64-Bit Server VM, Java 1.8.0_262).
Type in expressions for evaluation. Or try :help.
[info] started at Thu Jul 30 09:08:18 PDT 2020
SethTisue commented 4 years ago

@alexarchambault known problem? troubleshooting tips?

alexarchambault commented 4 years ago

Would it be possible to pass --ttl 0 to the underlying cs command? Doing it just once ought to update the version listing file, so that the newer version gets picked.

That originates from the those version listing files (like this one) not being updated, because the TTL now defaults to infinite for apps, with recent coursier versions.

dwijnand commented 4 years ago

I tried --ttl 0 and COURSIER_TTL and neither seem to work. Which is particularly worrying with the apps TTL change!

dwijnand commented 4 years ago

Found the commit: https://github.com/coursier/coursier/commit/2d96668e4b304969950590fbbe7138888be21cf0

Looks like -l works:

$ cs launch -l "5m" scala:2.12+
https://repo1.maven.org/maven2/io/get-coursier/apps/maven-metadata.xml
  No new update since 2020-07-12 21:39:52
Welcome to Scala 2.12.12-20200609-161259-75667a5 (OpenJDK 64-Bit Server VM, Java 11.0.6).
Type in expressions for evaluation. Or try :help.
dwijnand commented 4 years ago

Much like in https://github.com/dwijnand/scala-runners/issues/10#issuecomment-650235054, I was just about to close this issue as "bring it up with upstream if you don't like the behaviour". But we might still do something locally here, like we did for #10.

alexarchambault commented 4 years ago

--ttl and -l should correspond to the same option.

I know about COURSIER_TTL… That needs to be fixed.