Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Handle multiple user actions concurrently #727

Merged
merged 11 commits into from
Sep 5, 2020

Conversation

pepeiborra
Copy link
Collaborator

This improves on the single thread pumping user actions right now

@wz1000
Copy link
Collaborator

wz1000 commented Aug 13, 2020

This looks suspiciously similar to some of @mpickering's code I deleted from the stale info PR :)

What about your patch to handle requests concurrently? I've been feeling lack of that lately.

@pepeiborra
Copy link
Collaborator Author

This looks suspiciously similar to some of @mpickering's code I deleted from the stale info PR :)

Did he implement this too? Great minds think alike. Please share the link so that I can check if anything's missing.

What about your patch to handle requests concurrently? I've been feeling lack of that lately.

I haven't looked into that yet.

Copy link
Contributor

@rayshih rayshih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but the tests seem broken

src/Development/IDE/Types/Action.hs Outdated Show resolved Hide resolved
src/Development/IDE/Types/Action.hs Outdated Show resolved Hide resolved
@pepeiborra pepeiborra force-pushed the unlimited-recurse branch 3 times, most recently from f21edd9 to 9f56f99 Compare September 4, 2020 20:11
Instead of creating a new TQueue on every restart, we reuse the same TQueue
over and over.

The trickiest bit is to ensure that enqueued actions are always retried when
a Shake session is cancelled. The ActionQueue datatype is intended to manage
this complexity.
Unfortunately these are dependent on the ghc version
These tests are failing because ghcide is sending diagnostics interleaved with
completions now (which is good) and the tests cannot handle it
@pepeiborra pepeiborra merged commit 5dd52ec into haskell:master Sep 5, 2020
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* tighten some return types

* Extract ShakeQueue from shakeSession

Instead of creating a new TQueue on every restart, we reuse the same TQueue
over and over.

The trickiest bit is to ensure that enqueued actions are always retried when
a Shake session is cancelled. The ActionQueue datatype is intended to manage
this complexity.

* Handle multiple user actions concurrently

* Fixes for .ghci

Unfortunately these are dependent on the ghc version

* redundant parens

* Formatting

* Attempt fix for completion tests

These tests are failing because ghcide is sending diagnostics interleaved with
completions now (which is good) and the tests cannot handle it

* remove debugging printout

* simplify

* Fix a test

* Fix flaky tests
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* tighten some return types

* Extract ShakeQueue from shakeSession

Instead of creating a new TQueue on every restart, we reuse the same TQueue
over and over.

The trickiest bit is to ensure that enqueued actions are always retried when
a Shake session is cancelled. The ActionQueue datatype is intended to manage
this complexity.

* Handle multiple user actions concurrently

* Fixes for .ghci

Unfortunately these are dependent on the ghc version

* redundant parens

* Formatting

* Attempt fix for completion tests

These tests are failing because ghcide is sending diagnostics interleaved with
completions now (which is good) and the tests cannot handle it

* remove debugging printout

* simplify

* Fix a test

* Fix flaky tests
pepeiborra added a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* tighten some return types

* Extract ShakeQueue from shakeSession

Instead of creating a new TQueue on every restart, we reuse the same TQueue
over and over.

The trickiest bit is to ensure that enqueued actions are always retried when
a Shake session is cancelled. The ActionQueue datatype is intended to manage
this complexity.

* Handle multiple user actions concurrently

* Fixes for .ghci

Unfortunately these are dependent on the ghc version

* redundant parens

* Formatting

* Attempt fix for completion tests

These tests are failing because ghcide is sending diagnostics interleaved with
completions now (which is good) and the tests cannot handle it

* remove debugging printout

* simplify

* Fix a test

* Fix flaky tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants