Skip to content

lsp: Poll workspace state to detect state changes #954

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

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

charlieegan3
Copy link
Member

@charlieegan3 charlieegan3 commented Jul 31, 2024

Fixes #857

I will add some notes to the issue too, but in short I found that it
wasn't possible to catch new files added to new directories without some
polling-based delay. So I have opted for the keep it simple approach for
now.

f0bce94
was an attempt to get the fsnotify based implementation working before I opted
to just poll instead.

Note, this will ignore files that are present in the cache but with a different content in case the file is in an open buffer, we will continue to use that contents.

Signed-off-by: Charlie Egan <charlie@styra.com>
This reverts commit f0bce94.

I am going to use a simple polling approach.
Fixes StyraInc#857

I will add some notes to the issue too, but in short I found that it
wasn't possible to catch new files added to new directories without some
polling-based delay. So I have opted for the keep it simple approach for
now.

Signed-off-by: Charlie Egan <charlie@styra.com>
Copy link
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

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

LGTM! The comments were very helpful for understanding the flow.

@anderseknert anderseknert merged commit 565f509 into StyraInc:main Aug 1, 2024
3 checks passed
@charlieegan3 charlieegan3 deleted the poll-workspace-state branch August 1, 2024 13:24
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* WIP: attempt to use fsnotify reliably

Signed-off-by: Charlie Egan <charlie@styra.com>

* Revert "WIP: attempt to use fsnotify reliably"

This reverts commit f0bce94.

I am going to use a simple polling approach.

* lsp: Poll workspace state to detect state changes

Fixes StyraInc#857

I will add some notes to the issue too, but in short I found that it
wasn't possible to catch new files added to new directories without some
polling-based delay. So I have opted for the keep it simple approach for
now.

Signed-off-by: Charlie Egan <charlie@styra.com>

---------

Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Jan 6, 2025
* WIP: attempt to use fsnotify reliably

Signed-off-by: Charlie Egan <charlie@styra.com>

* Revert "WIP: attempt to use fsnotify reliably"

This reverts commit f0bce94.

I am going to use a simple polling approach.

* lsp: Poll workspace state to detect state changes

Fixes StyraInc#857

I will add some notes to the issue too, but in short I found that it
wasn't possible to catch new files added to new directories without some
polling-based delay. So I have opted for the keep it simple approach for
now.

Signed-off-by: Charlie Egan <charlie@styra.com>

---------

Signed-off-by: Charlie Egan <charlie@styra.com>
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.

Diagnostics reported remains after branch change where file doesn't exist
2 participants