-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
use new zinc 1.8 api for VirtualFile #18137
use new zinc 1.8 api for VirtualFile #18137
Conversation
16f9ef0
to
0c8dcf3
Compare
e29e82a
to
16b91ba
Compare
zinc 1.4 removes the dependency on protobuf-java, so fails to compile mtags-shared due to the now missing transitive dependency. The compiler implements protobuf streams for semanticdb, so reuse it in the source generator for mtags-shared.
8c22ff5
to
5e9fd97
Compare
5e9fd97
to
2458b8f
Compare
@smarter the files and sources caches get destroyed on each new run, so the initial source files still need to be stored separately |
b5c096f
to
95ed582
Compare
This is ready to go |
036107a
to
8f128fd
Compare
@smarter I now only do the hash map lookup, no longer |
e99b9e5
to
5fde72c
Compare
test performance please |
performance test scheduled: 227 job(s) in queue, 1 running. |
Performance test finished successfully: Visit https://dotty-bench.epfl.ch/18137/ to see the changes. Benchmarks is based on merging with main (046ba60) |
again not sure if the benchmark regression was this or something older |
I did my own analysis with async-profiler - this is a clear win over the status quo - e.g. on so there's an improvement from 9-11% of Similar improvements exist for |
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.
Otherwise LGTM.
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 seems IntelliJ has issues building projects with a compiler version after this was merged, maybe someone else could confirm? |
Backports #18137 to the LTS branch. PR submitted by the release tooling. [skip ci]
this prepares the compiler to be able to call new API's in Zinc, by implementing infrastructure to call back into Zinc with
VirtualFile
.A good side effect of this change is improved performance when using sbt to "clean compile" code, as extra bridging methods from
java.io.File
toxsbti.VirtualFile
in Zinc are avoided.Also remains compatible with Zinc 1.3, to do this we introduce a new interface
dotty.tools.dotc.sbt.interfaces.IncrementalCallback
, this abstracts overVirtualFile
, and so the sbt-bridge handles the entire mapping betweenVirtualFile
toAbstractFile
, and then back fromSourceFile
to eitherVirtualFile
orjava.io.File
, depending on the implementation.Even if we remove Zinc 1.3 support, we probably want to keep the new interface because all the VirtualFile mapping logic can be contained in sbt-bridge