-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactoring git
domain to use async generators, remove readable-stream, simplify utilities
#709
Refactoring git
domain to use async generators, remove readable-stream, simplify utilities
#709
Conversation
git
domain
The reference discovery stage has been completed. I implemented it as |
Generators are a higher level construct indeed. I think streams represent a lower level construct, and also streams are actually synchronous. Whereas generators represent coroutines in the javascript runtime. So if you're dealing at the object-level then async generator abstraction is better abstraction. |
In the future, you should write up your own branch name. |
New types and new classes need to be documented into the spec. Like this: Module
Give a reason as why they exist now. |
Expected to take the whole cycle. |
Progress update: I've converted to using generators and swapped over to using them in the code. The test I've been using as a sanity check is passing as well. I'm going to go back through the code and clean it up a little now. |
It seems odd that |
Originally isogit did not have server-side functionality. Only client side. You were able to replace it all? I thought there was git server functionality that was missing. Remember in the future we may want to expose an http API.
|
It is missing the server side functionality, but it does provide a lot of plumbing functionality for interacting with the git structure that the For example, Listing all the existing refs, resolving them to objectIds, then finding all of the dependent objectIds, and finally creating the packfile format that gets sent over can all be done with isogit. The only thing I had to do was generate the HTTP responses in the proper format. |
Then yes it was a quick and dirty job. |
Originally we even wanted to use libgit2 but it was easily adapted to work on a in-memory virtual filesystem. Too tied into posix fs semantics. |
Mostly done now. Just need to fix some tests in the vaults domain now. Along with doing the benchmarks. I think the benchmarks can be moved to a 2nd stage PR. I also think the whole vaults domain needs a general review and touch up, also in a separate PR. |
Tests are fixed, I added a end-to-end integration tests of of cloning and pulling in the I'm going to look into the clone/pull bug mentioned from before and then move on the merge prep. I'll start a new PR for adding the benchmarks. |
1 test relating to discovery and 2 tests relating to MDNS are consistently failing. I'm not sure why and they're wait out of scope of this work so it shouldn't be affected. |
9c0e484
to
7b80b6b
Compare
This is ready for review. I'm going to start the benchmarks in a new PR for now. |
[ci skip]
e33d18f
to
405af92
Compare
git
domaingit
domain to use async generators, remove readable-stream, simplify utilities
I added some additional review comments with a first glance. Also this review comment previously should be addressed: #709 (review). Otherwise is there specific things you want reviewed? |
The final checklist should be ticked off. |
Nothing specific needs to be reviewed, just need the extra pair of eyes for the due diligence. I'm leaving the checklist along for when the review changes have been addressed. |
[ci skip]
[ci skip]
Done and ready to merge. I'm going to rebase the related PRs before merging this. |
Description
This PR addresses refactoring the
git
domain to be more clear and more in line with our latest practices.Issues Fixed
git/utils.ts
for Serving Vault Git Repositories #298readable-stream
usage with Web Streams in the Vaults and Git Domains #523Tasks
http.ts
file.utils.ts
.8. Performance is an issue here, so benchmarks should be added to test for future regressions.- Differed to a new PR. It will test the current changes but nothing here will depend on benchmarks, so I'm just going to make it separate.readable-stream
usage with Web Streams in the Vaults and Git Domains #523 has been addressed fullyFinal checklist