Skip to content

Fix LSP not allowing multiple connections - #6311

Merged
pchiusano merged 5 commits into
unisonweb:trunkfrom
giodamelio:fix-multiple-lsp-connections
Nov 10, 2026
Merged

pchiusano merged 5 commits into
unisonweb:trunkfrom
giodamelio:fix-multiple-lsp-connections

Conversation

@giodamelio

@giodamelio giodamelio commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Unisons LSP is currently accepting on the first connection per run. Even after that connection is finished it won't accept any new connections. It looks like it was #6196 (fe8c4d6) when doing a fix for an unrelated bug on Windows.

This just wraps the code that accepts the TCP connections in a forever so we keep accepting connections for the remainder of the programs life.

Implementation approach and notes

Not much there really.

Interesting/controversial decisions

Include anything that you thought twice about, debated, chose arbitrarily, etc.
What could have been done differently, but wasn't? And why?

Test coverage

  • Have you included tests (which could be a transcript) for this change, or is it somehow covered by existing tests?

    • No, there aren't any existing harnesses for the LSP over TCP as far as I can tell.
  • Would you recommend improving the test coverage (either as part of this PR or as a separate issue) or do you think it’s adequate?

    • Ya a test suite to stop other regressions like this seems like a great idea. I'm not farmiliar enough with this codebase to do that though.
  • If you only tested by hand, because that's all that's practical to do for this change, mention that. Include screenshots.

    • Not much to screenshot really, just try connecting to the LSP more then once with a single UCM session. I just repeatedly opened and closed my editor. Before it only worked the first time, and with this code it keeps working.

Loose ends

  • I'm unable to test this on Windows. I don't have any reason to believe this would break it, but would love to be sure.

Final checklist

  • Choose your PR title well: Your pull request title is what's used to create release notes, so please make it descriptive of the change itself, which may be different from the initial motivation to make the change.
  • Update your PR description if the specifics of the PR have changed over time.
  • Include transcripts or screenshots that demonstrate the changed behavior.
  • If you changed .cabal files, make sure the package.yaml files are up-to-date instead.

@giodamelio
giodamelio force-pushed the fix-multiple-lsp-connections branch from 99f9e27 to c730d3d Compare October 23, 2026 04:08
# Conflicts:
#	.github/workflows/proofs/formatting/56998ade2cbe97a2d75bf089791a6a9aafdd283dbaae2144956b2fd3da041308.txt
#	.github/workflows/proofs/formatting/95fd4ada8473d3dc6adb88e59c5c03679521dc16f1c9c037e675718bb793ead6.txt
#	.github/workflows/proofs/formatting/aeee91899983efc2eb3b0561e70da2ac4bcf8e8be963f792869d01a49ee37311.txt
#	.github/workflows/proofs/tests/0cd5015b7767d2f6f6824138f52707d4f03d7af73b0755bb4041be578b890792.txt
#	.github/workflows/proofs/tests/bb0202a570361097cedaee9fd0ca47d7fd82377ec5a8aaf3ec165472cf441c9a.txt
#	.github/workflows/proofs/tests/bfb836c8254cb74981afdac5af50d219e9d902750a0a8674236e67946d437b88.txt
#	.github/workflows/proofs/transcripts/c08c13f6755ee35a247e88cfe9870590ec870f802dcd7817b458a6c6b97655eb.txt
pchiusano added a commit to fpringle/unison that referenced this pull request Nov 10, 2026
pchiusano added a commit to fpringle/unison that referenced this pull request Nov 10, 2026
@pchiusano
pchiusano added this pull request to the merge queue Nov 10, 2026
Merged via the queue into unisonweb:trunk with commit a26d792 Nov 10, 2026
10 checks passed
@giodamelio

Copy link
Copy Markdown
Contributor Author

Thanks for getting this across the line!

@pchiusano

Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants