-
Notifications
You must be signed in to change notification settings - Fork 128
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 Scala Native directory project caching #641
Conversation
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.
👍
It would be neat to have a non-regression test for that.
Sure! I'll add some tests |
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.
We can address the point in my comment in another PR…
} | ||
Iterator(elem.path.toString, content, "\n").map(bytes) | ||
Iterator((elem.path.toString +: content :+ "\n"): _*).map(bytes) |
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.
We don't need to build a new string here, only to convert it to bytes from the iterator later on. This should have worked:
Iterator((elem.path.toString +: content :+ "\n"): _*).map(bytes) | |
(Iterator(elem.path.toString) ++ content.iterator ++ Iterator("\n")).map(bytes) |
* Fix Scala Native directory project caching * Adjust SN caching tests to test directory caching * run scalafmt * Add iterators instead of converting to string
Previously if
scala-cli run srcDir --native
was run, only the initial project would be cached and used, with following changes to the codebase being ignored.