Skip to content

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


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.


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