sbt / zinc

Scala incremental compiler library, used by sbt and other build tools
Apache License 2.0
334 stars 121 forks source link

Allow operation without a filesystem #717

Closed stephenjudkins closed 1 month ago

stephenjudkins commented 4 years ago

Currently, input and output files are specified in the API in terms of java.io.File. The underlying Scala compiler, however, does not require interaction with the filesystem. If inputs and outputs could be handled through in-memory data structures it could open the door for some optimizations in some cases (in this case, in the https://github.com/higherkindness/rules_scala project).

I'm aware this is a large issue, but figured I'd open it to signal support.

eed3si9n commented 4 years ago

@stephenjudkins Thanks. I am sort of working on this here - https://github.com/sbt/zinc/pull/712

stephenjudkins commented 4 years ago

This is wonderful, I'm glad to know it's being worked on.

eed3si9n commented 4 years ago

@stephenjudkins I now have tests passing with in-memory source code. I don't know how difficult it would be to abstract the JAR files, but I feel like I should just allow JAR files to be.

Friendseeker commented 1 month ago

I assume Zinc's current virtual file system counts as "Allow operation without a filesystem". If Zinc's current implementation is not good enough, we can revisit the issue later.