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

Make cache-db.json into a binary file #4010

Open
hdgarrood opened this issue Feb 6, 2021 · 1 comment
Open

Make cache-db.json into a binary file #4010

hdgarrood opened this issue Feb 6, 2021 · 1 comment

Comments

@hdgarrood
Copy link
Contributor

hdgarrood commented Feb 6, 2021

Summary

Replace cache-db.json with cache-db.cbor, using the same mechanism for serialization as we already do for externs files.

Motivation

The correctness of the incremental build system depends on an assumption that only the compiler is doing anything with cache-db files, so avoiding JSON is desirable because it also decreases the likelihood that other projects might start depending on them. It should help speed up serialization and deserialization a bit too.

@hdgarrood
Copy link
Contributor Author

Alternatively we may want to just leave this file alone for now, and instead work towards cutoff in our incremental build system so that we can get rid of the cache-db.json file completely: #3996 (comment)

The cache-db.json file is only necessary because we don’t have cutoff. If we did, we could safely store the last seen timestamps and hashes of input files in their respective externs file (by not considering this information to be part of the module interface), and not need a separate cache-db.json file at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant