Skip to content
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

Caching of (not only) test results #206

Closed
sideeffffect opened this issue Nov 1, 2022 · 1 comment
Closed

Caching of (not only) test results #206

sideeffffect opened this issue Nov 1, 2022 · 1 comment

Comments

@sideeffffect
Copy link
Contributor

sideeffffect commented Nov 1, 2022

Here may be the wrong place to ask, because I know Bleep uses Bloop heavily for many things, but I'm still curious.

What is the caching story for Bleep? How does it prevent unnecessary computation taking place over and over? For example does it cache the results of tests?

Also, where is such cache located? Can it be saved/stored somewhere and then later and/or elsewhere unpacked/re-hydrated and reused?

@oyvindberg
Copy link
Owner

Not at all really, Bleep just defers to Bloop. See for instance the implementation of Test - it's just forwarding through BSP.

Bloop on the other hand does keep some state to avoid needless recompiling, particularly through zinc.

For tests it is not feasible to safely cache test results on the JVM, as you would need both some proof of pureness and a digest of the transitive call graph for each test - like what unison does.

The only cache in Bleep is for for resolving dependencies through coursier. What is done there is the definition of a dependency has been heavily constrained from sbt (dropping a decade of incredibly obtuse ivy-stuff nobody uses), so that it's much easier to cache. Constraining the dependency "language" makes it much easier to cache, so this is a large part of why Bleep loads builds almost instantly - it trades disk space for speed.

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

No branches or pull requests

2 participants