Skip to content
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

benchmark dotty compiler #29

Closed
lrytz opened this issue Jun 3, 2017 · 8 comments
Closed

benchmark dotty compiler #29

lrytz opened this issue Jun 3, 2017 · 8 comments

Comments

@lrytz
Copy link
Member

lrytz commented Jun 3, 2017

Wip: https://github.com/scala/compiler-benchmark/compare/master...lrytz:dotty?expand=1

@lrytz
Copy link
Member Author

lrytz commented Jun 3, 2017

This is currently crashing the Scala compiler due to scala/scala3#2670.

> hot -p source=/Users/luc/scala/compiler-benchmark/sandbox/Hello.scala
[info] Updating {file:/Users/luc/scala/compiler-benchmark/}infrastructure...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] 	* com.google.guava:guava:20.0 -> 21.0
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating {file:/Users/luc/scala/compiler-benchmark/}compilation...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Compiling 9 Java sources to /Users/luc/scala/compiler-benchmark/infrastructure/target/classes...
[info] Compiling 1 Scala source and 1 Java source to /Users/luc/scala/compiler-benchmark/compilation/target/scala-2.11/classes...
[error] error while loading package, class file '/Users/luc/.ivy2/cache/ch.epfl.lamp/dotty-compiler_0.1/jars/dotty-compiler_0.1-0.1.2-RC1.jar(dotty/tools/package.class)' is broken
[error] (class java.lang.ArrayIndexOutOfBoundsException/1710)
[error] error while loading Main, class file '/Users/luc/.ivy2/cache/ch.epfl.lamp/dotty-compiler_0.1/jars/dotty-compiler_0.1-0.1.2-RC1.jar(dotty/tools/dotc/Main.class)' is broken
[error] (class java.lang.ArrayIndexOutOfBoundsException/2130)
[error] two errors found
[error] (compilation/compile:compileIncremental) Compilation failed
[error] Total time: 4 s, completed Jun 3, 2017 4:18:59 PM

cc @smarter

@smarter
Copy link
Member

smarter commented Jun 3, 2017

Hi @lrytz ! @olafurpg is already working on benchmarking infrastructure for dotty, you guys should collaborate, see https://github.com/dotty-staging/compiler-benchmark

@lrytz
Copy link
Member Author

lrytz commented Jun 3, 2017

Nice! We should get this running on our machine so we have comparable results.

@olafurpg
Copy link
Member

olafurpg commented Jun 6, 2017

Cool! I'd love to collaborate. Here is a rough summary of changes I made to the repo,

If you are interested in getting any of those changes into scala/compiler-benchmark, I may be able to pull out the necessary bits into a review-friendly PR.

@smarter
Copy link
Member

smarter commented Jun 6, 2017

I almost managed to compile the benchmark project with Dotty but hit on a MatchError in the backend.

It'd be great if you could open a bug report for that.

@olafurpg
Copy link
Member

olafurpg commented Jun 6, 2017

@smarter Will do. I spent a while trying to minimize that error, but then I got distracted with Scaladays preparations! It was related to Java annotations and default parameters.

@lrytz
Copy link
Member Author

lrytz commented Jun 8, 2017

@olafurpg nice work! I think we should get everything merged here so that we can run the benchmarks on dotc and publish to the same database. We run through jenkins (https://scala-ci.typesafe.com/view/scala-bench/job/compiler-benchmark/528/parameters/), we'll have to do a few adjustments there too.

olafurpg added a commit to olafurpg/compiler-benchmark that referenced this issue Jun 14, 2017
Note, the benchmarks currently don't actually run with Dotty because of
scala/scala3#2704.

- scalac and dotc driver separated in src/main/{scalac,dotc}.
- unit tests for rapic local iteration without the need to remember cli args.
- `fork in run` is necessary for -usejavacp to work with compilation/run
- `FileVisitOption.FOLLOW_LINKS` produces duplicate filenames, which
  causes "X is already compiled in this run" errors in Dotty.
olafurpg added a commit to olafurpg/compiler-benchmark that referenced this issue Jun 14, 2017
Note, the benchmarks currently don't actually run with Dotty because of
scala/scala3#2704.

- scalac and dotc driver separated in src/main/{scalac,dotc}.
- unit tests for rapic local iteration without the need to remember cli args.
- `fork in run` is necessary for -usejavacp to work with compilation/run
- `FileVisitOption.FOLLOW_LINKS` produces duplicate filenames, which
  causes "X is already compiled in this run" errors in Dotty.
olafurpg added a commit to olafurpg/compiler-benchmark that referenced this issue Jun 14, 2017
Note, the benchmarks currently don't actually run with Dotty because of
scala/scala3#2704.

- scalac and dotc driver separated in src/main/{scalac,dotc}.
- unit tests for rapic local iteration without the need to remember cli args.
- `fork in run` is necessary for -usejavacp to work with compilation/run
- `FileVisitOption.FOLLOW_LINKS` produces duplicate filenames, which
  causes "X is already compiled in this run" errors in Dotty.
olafurpg added a commit to olafurpg/compiler-benchmark that referenced this issue Jun 14, 2017
Note, the benchmarks currently don't actually run with Dotty because of
scala/scala3#2704.

- scalac and dotc driver separated in src/main/{scalac,dotc}.
- unit tests for rapic local iteration without the need to remember cli args.
- `fork in run` is necessary for -usejavacp to work with compilation/run
- `FileVisitOption.FOLLOW_LINKS` produces duplicate filenames, which
  causes "X is already compiled in this run" errors in Dotty.
olafurpg added a commit to olafurpg/compiler-benchmark that referenced this issue Jun 14, 2017
Note, the benchmarks currently don't actually run with Dotty because of
scala/scala3#2704.

- When `scalaVersion := "0.x"`, then "src/main/dotc" is  added to
  unmanagedSourceDirectories, otherwise "src/main/scalac" is added.
- compilation/test checks the setup is OK without the need to remember cli args.
- `fork in run` is necessary for -usejavacp to work with compilation/run
- `FileVisitOption.FOLLOW_LINKS` produces duplicate filenames, which
  causes "X is already compiled in this run" errors in Dotty.
@olafurpg
Copy link
Member

I just opened #31, which adds support to compile the benchmarks with dotty.

retronym added a commit that referenced this issue Aug 23, 2017
Compile benchmark with Dotty, fixes #29.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants