Conversation
…ing-persistence-crates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah! I‘m quite surprised by this PR.
- Why renaming all of this to lib3h_persistence? I thought lib3h would use the same CAS/EAV from core.
- Why ripping out all the implementations? I thought lib3h would get a trait object in the same way core just gets a trait object from the conductor. That way we keep core clean from file system access code and alike that won’t compile to WASM and confine future compile-time switches to only conductor level.
I would like to talk about the applied strategy in this PR. I‘m pretty sure we can do this (providing storage to lib3h) with much less changes and much less consequences.
I've merged in @AshantiMutinta's changes in 7b703d2 and holochain/lib3h#109 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy To See this in, looks good!
…ing-persistence-crates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm still pretty confused about the idea of "lib3h persistence crates"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we have the persistence crates up on crates.io but the source is still in the lib3h repo. I just came back to this because I was about to add a new constructor to the EavFilter
, i.e. I was about to make a change to the stuff that gets moved out of this repo here.
I would very much prefer moving this code into its own repo over moving it to the lib3h repo, and I still would prefer leaving it here over moving it out at all.
Suggestion for a compromise: changing the title of this PR to "Moving persistence crates to their own repository" and making it do exactly that. @thedavidmeister, do you think that makes sense? From my perspective it still seems to be a mistake to move this out of this repository at all (at this point at least) since we do have some implicit coupling between the CAS/EAVI implementations and how core works. Progressing core likely leads to changes or additions being needed which then all require a version bump and crates.io publish just for compiling and running CI on it.
The names are now:
You're right that in essence the trait is the only thing that is needed to be shared and perhaps that would have been a simpler approach to start with. However from a separation of concerns perspective it's beneficial to factorize out the shared implementations and since the work is done we might as well take advantage of it. As for what repo the code should exist, the ideal is to make separate repositories for persistence and json, but at the moment they live in
@lucksus We had a few overflow discussions to reach agreement- are there any other concerns left on your end? |
Renamed to |
} | ||
|
||
unsafe impl Sync for Attribute {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this have to be unsafe?
PR summary
This PR incorporates the new persistence crates migrated from
holochain-core
and generalized into thelib3h
repo.cas
andeav
apis are stripped out fromholochain_core_types
intoholochain_persistence_api
within holochain-persistence repositorycore_types_derive
is moved into holochain-serialization asholochain_json_derive
cas_implementations
is removed and factored intoholochain_persistence_[mem|file|pickle]
in the holochain-persistence repository.EntityAttributeValueIndex::new
with a factory function ineavi.rs
(previously was done internally).testing/benchmarking notes
( if any manual testing or benchmarking was/should be done, add notes and/or screenshots here )
followups
changelog
Please check one of the following, relating to the CHANGELOG-UNRELEASED.md
- summary of change [PR#1234](https://github.com/holochain/holochain-rust/pull/1234)