Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] LSP4e document corruption
  • From: Ahmed Hussain <ahmed@xxxxxxxxxx>
  • Date: Wed, 4 May 2022 16:54:38 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cocotec.io; dmarc=pass action=none header.from=cocotec.io; dkim=pass header.d=cocotec.io; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=x1As1kK0bAwQD02fmewHmt2vPCaoMMrzQ2KSyTLwGQs=; b=RZ6/6sPSs8Z2cHB22wGyiOiPgm6eYfWwwNDsXmgp8eyZTUQBsrHyzyckEtLmHM9GrLKTRUZyD1OzWRAJYhZ4YEWVJ50vdLUKr4OdwQ/sgr5s/tlJpqlIRGxzDwqeWYNJrGp0Mg0RGXoZakt/FfNw5IZbDjDex0C+Goxq7bBSUO9IGDSoTw+7MJS86utEnmfOMtnT4sw/FDVUYYgLt/Ts7tg/xr3qH7SfFiiDlogIV2ZbDtjY0GpJ2dRqJ2O9yGn4afVwl9jdQXsVRlBulhP+q7u/rLHMEuFxanN5BC4X1jrboKyVE4FoKH0XVNgwjFSKaeLHXlhU/aZY8RCe4BZKsQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BUBNQZ3r1I5jPJ22H8vOdpwJKst5TBTkby9FZeR89oavPvZPTn4qap6F2BV+IFJcB2njql5VS+nc823K98l7t4iC8c9ziFDbiuhtg6rC0apurj2vTchKUrg5pfVwMqUQHaoKFooKoKTzcmDoYXEFTHuSlfM8wonlnSuzlr13pZCHcCi/hkY0OHstWXTct3rFfctmGPVfAQeEDhnYCsRaSNBfV+9FYueF2ddSogItKzCsK99GTkA8tFkBpYuoGVnRr+hzMxqV+oLrpWdC41BXfZVGSWCZ7Me4kJCxfqULzvPe4mWVmdZZOk65Ug75uzFG/3vlCfGrY1JgzEwymj/lfQ==
  • Delivered-to: lsp4e-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/lsp4e-dev/>
  • List-help: <mailto:lsp4e-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/lsp4e-dev>, <mailto:lsp4e-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/lsp4e-dev>, <mailto:lsp4e-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHYOfEJjzoSfYGYRkOT0S8KxGpL3azDi4UAgAAER4CAS6uYgA==
  • Thread-topic: [lsp4e-dev] LSP4e document corruption

We’re just in the process of brushing up some of our fixes for submission. What’s the preferred way to go about it? Should we first raise GitHub issues and then submit the PRs that address them?

Thanks,

Ahmed (pp Tom!)


> On 17 Mar 2022, at 13:20, Thomas Gibson-Robinson via lsp4e-dev <lsp4e-dev@xxxxxxxxxxx> wrote:
> 
> 
>> On 17 Mar 2022, at 13:05, Mickael Istria <mistria@xxxxxxxxxx> wrote:
>> 
>> It's a genuine problem of LSP4E.
>> However, I don't think you need a FIFO. You actually need to keep the last future that was created for a change and call something like `lastFuture = lastFuture.thenRun(ls -> ls.getTextDocumentService().didChange(changeParamsToSend));` to ensure the sequential invocations. Maybe even replace `languageServerWrapper.getInitializedServer()` by a method that takes care of returning the last change future.
> 
> That’s indeed exactly the kind of fix I was imagining. Whilst experimenting, I just added a variable lastChangeFuture on the DocumentContentSynchronizer and used thenApplyAsync to chain them together which seemed to resolve the problem.
> 
> Thanks for the comments. We’ll submit a patch along the above lines (I like your suggestion of a method on LanguageServerWrapper).
> 
> Tom
> 
> _______________________________________________
> lsp4e-dev mailing list
> lsp4e-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/lsp4e-dev


Back to the top