Skip to content

Fix -Ythrough-tasty #4664

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
Jun 16, 2018
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
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/fromtasty/Debug.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ object Debug {

val fromTastyOut = Files.createDirectory(tmpOut.resolve("from-tasty"))

val ext = "hasTasty"
val classes = Directory(fromSourcesOut).walk.filter(x => x.isFile && x.extension == ext).map { x =>
val extensions = List("tasty", "hasTasty").map(_.toLowerCase)
val classes = Directory(fromSourcesOut).walk.filter(x => x.isFile && extensions.exists(_ == x.extension.toLowerCase)).map { x =>
val source = x.toString
// transform foo/bar/Baz.hasTasty into foo.bar.Baz
source.substring(fromSourcesOut.toString.length + 1, source.length - ext.length - 1).replace('/', '.')
source.substring(fromSourcesOut.toString.length + 1, source.length - x.extension.length - 1).replace('/', '.')
}.toList

val fromTastyArgs = {
Expand Down