macrome-js / macrome

The in-tree build system
MIT License
7 stars 1 forks source link

Review: recent work #33

Closed conartist6 closed 2 years ago

conartist6 commented 2 years ago

I've stepped away from this project for too long and picked down and set up the work too many times. I have significant amounts of change amassed, but I think some of it is just churn. I'm creating this PR to review my own work and regain context so that I can decide what the best way forward is.

conartist6 commented 2 years ago

The biggest thing I'm trying to figure out right now is caching. How should it work? What should be transparent, and what should be opaque? What can be cached and what can't be? How many different levels of cache do we need?

conartist6 commented 2 years ago

Do we need a filesystem caching layer at all? Could we just ask watchman to do the caching and query it for example? I think we probably do need a cache of our own because we want to cache information that watchman cannot collect for us, namely the content of annotations. The cache also needs to contain the file's unique id (i.e. mtime or hash) so that we can resolve references in a way that ensures freshness.

conartist6 commented 2 years ago

We must ensure that our cache contains no state. This is a mistake I know I've made as part of these changes. Because the cache is a shared asset program logic must not depend on its state, yet this is something I've implemented without thinking.

conartist6 commented 2 years ago

OK!!!!

Wow it's been a long time since the work I was doing passed the test suite, but no longer! Hopefully regular updates to this project may now resume and I will start to use it to build iter-tools.

conartist6 commented 2 years ago

BTW the branch was called fake because part of the changes was to make a fake implementation of watchman's query to stand in when watchman itself is not available.