diff --git a/infrastructure/src/main/java/scala/bench/ScalacBenchmarkRunner.java b/infrastructure/src/main/java/scala/bench/ScalacBenchmarkRunner.java index 3ea15b9..58ab090 100644 --- a/infrastructure/src/main/java/scala/bench/ScalacBenchmarkRunner.java +++ b/infrastructure/src/main/java/scala/bench/ScalacBenchmarkRunner.java @@ -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;