Skip to content
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

Changing entries in a list results in unsupported JSON patch operations #1099

Open
myieye opened this issue Oct 3, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@myieye
Copy link
Contributor

myieye commented Oct 3, 2024

This boils down to the fact that we really need to decide how we want to handle reordering.

Here's one such example that occurs if I replace the only semantic domain on a sense with a different one:

[fw-lite:local-web-app]       Failed to invoke hub method 'UpdateSense'.
[fw-lite:local-web-app]       System.NotSupportedException: no path operation can be made with an index, path: /semanticDomains/0/code
[fw-lite:local-web-app]          at LcmCrdt.Changes.<JsonPatchChange>F10BD6BCCDAB814FA329EAA352D2C6D6EA4DB4CF958F14BE59F84482F01C9EFD6__JsonPatchValidator.ValidatePatchDocument(IJsonPatchDocument patchDocument) in D:\code\languageforge-lexbox\backend\FwLite\LcmCrdt\Changes\JsonPatchChange.cs:line 66
[fw-lite:local-web-app]          at LcmCrdt.Changes.JsonPatchChange`1..ctor(Guid entityId, IJsonPatchDocument patchDocument, JsonSerializerOptions options) in D:\code\languageforge-lexbox\backend\FwLite\LcmCrdt\Changes\JsonPatchChange.cs:line 34
[fw-lite:local-web-app]          at LcmCrdt.Objects.Sense.ChangesFromJsonPatch(Sense sense, JsonPatchDocument`1 patch)+MoveNext() in D:\code\languageforge-lexbox\backend\FwLite\LcmCrdt\Objects\Sense.cs:line 67
[fw-lite:local-web-app]          at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
[fw-lite:local-web-app]          at LcmCrdt.CrdtMiniLcmApi.UpdateSense(Guid entryId, Guid senseId, UpdateObjectInput`1 update) in D:\code\languageforge-lexbox\backend\FwLite\LcmCrdt\CrdtMiniLcmApi.cs:line 299
[fw-lite:local-web-app]          at LocalWebApp.Hubs.MiniLcmApiHubBase.UpdateSense(Guid entryId, Guid senseId, JsonPatchDocument`1 update) in D:\code\languageforge-lexbox\backend\FwLite\LocalWebApp\Hubs\MiniLcmApiHubBase.cs:line 83
[fw-lite:local-web-app]          at LocalWebApp.Hubs.CrdtMiniLcmApiHub.UpdateSense(Guid entryId, Guid senseId, JsonPatchDocument`1 update) in D:\code\languageforge-lexbox\backend\FwLite\LocalWebApp\Hubs\CrdtMiniLcmApiHub.cs:line 55
[fw-lite:local-web-app]          at lambda_method25(Closure, Object)
[fw-lite:local-web-app]          at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteMethod(ObjectMethodExecutor methodExecutor, Hub hub, Object[] arguments)
[fw-lite:local-web-app]          at LocalWebApp.Hubs.LockedProjectFilter.InvokeMethodAsync(HubInvocationContext invocationContext, Func`2 next) in D:\code\languageforge-lexbox\backend\FwLite\LocalWebApp\Hubs\LockedProjectFilter.cs:line 12
[fw-lite:local-web-app]          at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<Invoke>g__ExecuteInvocation|18_0(DefaultHubDispatcher`1 dispatcher, ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments, AsyncServiceScope scope, IHubActivator`1 hubActivator, HubConnectionContext connection, HubMethodInvocationMessage hubMethodInvocationMessage, Boolean isStreamCall)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant