-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
CRDT sync handles parts of speech #1203
Conversation
9e6098d
to
ff28b54
Compare
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.
Several bits of this code I would like to discuss with @hahn-kev before merging the PR. But the new unit tests are passing, and the code looks generally all right to me.
backend/FwLite/FwLiteProjectSync/CrdtFwdataProjectSyncService.cs
Outdated
Show resolved
Hide resolved
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.
Nice work, just some minor changes, left a comment to start a discussion about if we want to even keep around the in memory implementation.
3336f16
to
c364294
Compare
@hahn-kev - All requested changes are done. Only thing I'm not sure of is the CreatePartOfSpeech(input) implementation for the dry run API. I have it just returning the input and not trying to call api.GetPartOfSpeech(input.Id) since that's almost certain to return null. However, I don't know if that's always going to be the case: I could see there being a situation, in certain tests perhaps, where CreatePartOfSpeech is being called in a situation where the api already has a PoS with that GUID. So perhaps I should have it return |
I'm fine with returning the input as that's what we do in the other APIs |
Test is now passing.
Should have the same code creating the CRDT PartOfSpeech object so they can't become inconsistent later.
0013457
to
b42959d
Compare
@hahn-kev - I've rebased on top of develop and fixed the merge conflicts. I did an interactive rebase so that I could edit the commits that added the PartOfSpeechSync code, and I rewrote them to use their own PartOfSpeechSync.cs static class similar to EntrySync etc. Tests are still passing. Everything should be ready to re-review and merge. |
We've decided to get rid of it, and it's a merge conflict for it to still exist here.
Fix #1178.
Parts of speech now sync both ways in FW and CRDT sync. Someday we may want to generalize this to include more types of CmPossibilityLists but for now parts of speech are working.
Semantic domains will be handled in a separate PR.