lib: Add the WorkingCopyStore trait and a default implementation.
In principle this trait is a layer above an actual VFS, but should be enough to start working with them. It's responsible for caching and managing working-copies which are stored locally or on a remote.
The plan is that jj run will query it to request working copies, which it then uses.
This checks the third checkmark in https://github.com/martinvonz/jj/issues/1869.
Progress on https://github.com/martinvonz/jj/issues/1869 and https://github.com/martinvonz/jj/issues/405
cc @martinvonz, @hooper, @kevincliao, @arxanas
Checklist
If applicable:
- [ ] I have updated
CHANGELOG.md - [ ] I have updated the documentation (README.md, docs/, demos/)
- [ ] I have updated the config schema (cli/src/config-schema.json)
- [ ] I have added tests to cover my changes
All kind suggestions are welcomed here, as I'm definitely not set on the API yet.
I plan to update this soon-ish, as I have a bunch of jj run related stuff stacked on top of it[^1]. I'll also close #2679 as it is now in this change.
[^1]: E.G querying/directory creation and the workqueue impl. This stuff is still "unfinished" but if I have a good API then the client should be easier right?
I'm going to mark this as finally ready for review and do a small self-review. It doesn't build just yet but in my mind the interface is well defined now and only should receive a better name.
I'm going to rework the interface again and am putting this on hold until standalone run works, as it clearly is a better approach.