Skip to content

Make corpus version auto-selection fail gracefully #38

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

Merged
merged 1 commit into from
Aug 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions infrastructure/src/main/java/scala/bench/ScalacBenchmarkRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,31 @@ private static String corpusVersion(String source) throws IOException {
throw new RuntimeException("Please provide -DscalaRef=...");

// TODO: git fetch --tags
try {

switch(source) {
case "vector":
if (GitWalker.isAncestor("v2.11.0", scalaRef, repo))
return "fb04376"; // compiles with 2.11.0, but not with 2.10.6
break;
switch (source) {
case "vector":
if (GitWalker.isAncestor("v2.11.0", scalaRef, repo))
return "fb04376"; // compiles with 2.11.0, but not with 2.10.6
break;

case "scalap":
if (GitWalker.isAncestor("v2.10.1", scalaRef, repo))
return "a8c43dc"; // compiles with 2.10.1, but not with 2.9.3
break;
case "scalap":
if (GitWalker.isAncestor("v2.10.1", scalaRef, repo))
return "a8c43dc"; // compiles with 2.10.1, but not with 2.9.3
break;

case "better-files":
if (GitWalker.isAncestor("v2.10.2", scalaRef, repo))
return "a45f905"; // compiles with 2.10.2, but not with 2.10.1
break;
case "better-files":
if (GitWalker.isAncestor("v2.10.2", scalaRef, repo))
return "a45f905"; // compiles with 2.10.2, but not with 2.10.1
break;

case "scala":
if (GitWalker.isAncestor("v2.11.5", scalaRef, repo))
return "21d12e9";
break;
case "scala":
if (GitWalker.isAncestor("v2.11.5", scalaRef, repo))
return "21d12e9";
break;
}
} catch (IllegalArgumentException iae){
// ignore, we might be on a dotty commit, just pick latest
}

return null;
Expand Down