Skip to content

Conversation

alexarchambault
Copy link
Contributor

@alexarchambault alexarchambault commented Feb 3, 2021

Related to com-lihaoyi/Ammonite#1150.

This PR allows to load *.tasty files from in-memory file systems (like dotty.tools.io.VirtualDirectory-based things) during compilation, rather than requiring them to exist on disk. This would be useful from Ammonite for example, that keeps the compiler output of previous compilation steps in memory.

Not sure if or where I should add tests for that.

Comment on lines 920 to 921
val tastyFileOrNull = classfile.container
.lookupName(classfile.name.stripSuffix(".class") + ".tasty", false)
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be a special-case just for virtual files or could this codepath also work for plain files?

Copy link
Contributor Author

@alexarchambault alexarchambault Feb 3, 2021

Choose a reason for hiding this comment

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

This should work for plain files too, I think. And using it there would run that code in the tests.

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