-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix -Ythrough-tasty #4664
Conversation
@@ -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") |
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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.
8a2934c
to
2d7a660
Compare
@@ -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 |
There was a problem hiding this comment.
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
2d7a660
to
bde19ec
Compare
some reason, so comparing against "hasTasty" always returned false