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

Conversation

smarter
Copy link
Member

@smarter smarter commented Jun 14, 2018

  • dotty.tools.io.Path#extension always returns something lowercase for
    some reason, so comparing against "hasTasty" always returned false
  • .tasty files were not supported

@@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List("tasty", "hasTasty").toLowerCase intead of on each file

val ext = "hasTasty"
val classes = Directory(fromSourcesOut).walk.filter(x => x.isFile && x.extension == ext).map { x =>
val extensions = List("tasty", "hasTasty")
val classes = Directory(fromSourcesOut).walk.filter(x => x.isFile && extensions.exists(_.toLowerCase == x.extension)).map { x =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is extension supposed to always return lower cases? If not, we should do x.extension.toLowerCase to make sure it is as we expected.

@@ -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").toLowerCase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List("tasty", "hasTasty").map(_.toLowerCase), my bad

- dotty.tools.io.Path#extension always return something lowercase for
  some reason, so comparing against "hasTasty" always returned false
- .tasty files were not supported
@smarter smarter force-pushed the fix/YthroughTasty branch from 2d7a660 to bde19ec Compare June 15, 2018 22:38
@nicolasstucki nicolasstucki merged commit 39c69c2 into scala:master Jun 16, 2018
@allanrenucci allanrenucci deleted the fix/YthroughTasty branch June 16, 2018 12:01
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

Successfully merging this pull request may close these issues.

2 participants