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

Is dir cache coming to buck2? #375

Open
zjturner opened this issue Aug 1, 2023 · 5 comments
Open

Is dir cache coming to buck2? #375

zjturner opened this issue Aug 1, 2023 · 5 comments

Comments

@zjturner
Copy link
Contributor

zjturner commented Aug 1, 2023

In buck1 you could specify dir = <some local path> in your buckconfig, and it would use that as a local object cache. It doesn't seem to be doing anything in buck2, despite being documented here. Am I holding it wrong, and it's supposed to work? Or will this be coming later? Or is it not planned for buck2?

@thoughtpolice
Copy link
Contributor

thoughtpolice commented Aug 1, 2023

No, a cursory glance indicates that dir isn't supported in buck2; as usual I suspect the answer is "use a remote cache service" for those cases since it's a superset of functionality, anyway.

The docs you're linking to are actually the original buck1 docs, but in many (most?) cases do not apply at all to buck2. They're just stuffed under docs/legacy, as the URL indicates.

Frankly, the docs/legacy directory should, IMO, just be blown away and deleted, or at minimum not part of the built website, because then it will come up when using e.g. the search bar, and it's just misleading and confusing because most of the options not only don't apply, they don't even tell you they're invalid (after all, Starlark itself can use read_config, so the possible values are 'open ended' in some sense.)

See also #152 and #250

@LegNeato
Copy link

LegNeato commented Aug 7, 2023

You could possibly glue https://github.com/allada/turbo-cache onto buck2 via using them both as libs in your own tool if you want functionality in the same binary. It might even be worth putting something like turbo-cache in buck2 behind a feature flag.

@zjturner
Copy link
Contributor Author

zjturner commented Aug 7, 2023

You could possibly glue https://github.com/allada/turbo-cache onto buck2 via using them both as libs in your own tool if you want functionality in the same binary. It might even be worth putting something like turbo-cache in buck2 behind a feature flag.

"Untested on Windows, but might work" rules it out for me. I'd like something that supports all of the same platforms that buck2 supports with the same SLA, or at the very least the same process for submitting fixes upstream. No word from the buck2 team yet, so I'll wait to draw any conclusions about the future here until they respond.

@thoughtpolice
Copy link
Contributor

Also, turbo-cache unfortunately is only really available to use as a Bazel target, not as a Rust crate from https://crates.io — crates make integrating into buck2 a lot easier since Reindeer can generate rules for it, rather than porting the build rules or porting the codebase directly into here. Turbo cache does look pretty good though, aside from that...

@ndmitchell
Copy link
Contributor

I think there might be a vague plan to roll out a dir cache, but thus far it hasn't been required for anything we've done. It has some value, so I imagine eventually it will bubble its way up to the top.

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

4 participants