From ff0b3c1d0078f482af533daee41ab8458f7293be Mon Sep 17 00:00:00 2001 From: Artem Pyanykh Date: Fri, 8 Dec 2023 23:58:10 +0000 Subject: [PATCH] misc: Remove a warning about an unexpected version The warning was long overdue for removal as it didn't reflect how the real editors do versioning (which is said because there's othewise no checksumming to ensure the states are consistent between the client and the server). --- Marksman/Doc.fs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Marksman/Doc.fs b/Marksman/Doc.fs index d5972d3..b1d412b 100644 --- a/Marksman/Doc.fs +++ b/Marksman/Doc.fs @@ -94,20 +94,6 @@ module Doc = >> Log.addContext "newVersion" newVersion ) - // Sanity checking - match newVersion, doc.version with - | newVersion, Some curVersion when curVersion > 0 -> - let expectedVersion = curVersion + change.ContentChanges.Length - - if expectedVersion <> newVersion then - logger.warn ( - Log.setMessage "Unexpected document version" - >> Log.addContext "uri" doc.id.Uri - >> Log.addContext "currentVersion" curVersion - >> Log.addContext "newVersion" newVersion - ) - | _ -> () - let newText = applyTextChange change.ContentChanges doc.text { withText exts newText doc with version = Some newVersion }