dwijnand / scala-runners

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

improve error message when running "head' version (e.g. `scala -2.13.head`) if PR merged but not published #13

Open SethTisue opened 4 years ago

SethTisue commented 4 years ago

so e.g. just now:

% ./scala -2.13.head
Resolution error: Error downloading org.scala-lang:scala-compiler:2.13.3-bin-914a270
  not found: /Users/tisue/.ivy2/local/org.scala-lang/scala-compiler/2.13.3-bin-914a270/ivys/ivy.xml
  not found: https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.13.3-bin-914a270/scala-compiler-2.13.3-bin-914a270.pom
  not found: https://scala-ci.typesafe.com/artifactory/scala-integration/org/scala-lang/scala-compiler/2.13.3-bin-914a270/scala-compiler-2.13.3-bin-914a270.pom

that's because https://travis-ci.org/github/scala/scala/jobs/678724885 hasn't finished yet

I suppose the ideal behavior would be to fall back to previous commits until it finds one that's available? printing warnings as it does so, in case the user really did want the PR they just merged moments ago?

dwijnand commented 4 years ago

I suppose the ideal behavior would be to fall back to previous commits until it finds one that's available?

I'm wary of such a "transparently fix it for me" solutions, but not (yet?) completely against it.

In some sense the current behaviour is correct: 2.13.head is 2.13.3-bin-914a270 and it's not available. The behaviour you describe is (2.13.x).find(_.available) (just to pseudo-code it).

Hmm 🤔

dwijnand commented 4 years ago

I guess, at the very minimum, the code branch that 2.13.head goes down could emit a more explicit/obvious error message.

SethTisue commented 4 years ago

perhaps a nice error is better