Skip to content
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

Rules don't apply live to files that are updated externally #116

Open
Helyk opened this issue Oct 24, 2024 · 8 comments
Open

Rules don't apply live to files that are updated externally #116

Helyk opened this issue Oct 24, 2024 · 8 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@Helyk
Copy link

Helyk commented Oct 24, 2024

Possibly related to #115 because it is observed in the same 10k-150k lines log files where most lines have highlights, but behaves differently so I'm making a separate issue.

When viewing live logs where lines are added in real time by a process running in the background, the newly added lines have no highlights from applicable rules. Same rules successfully show highlights on the part of the log that already existed when the file was initially opened. Disabling and re-enabling a rule applies it to the newly added lines successfully, but it would be much better to not have to do that.

It's worth mentioning that the particular case where I see it most often has a multi-line rule which highlights a line with a particular text and also two preceding lines.

@stneveadomi
Copy link
Owner

This hopefully should be a relatively easy fix as I believe this is simply listening to a specific update event from VS Code. Will look into this.

@stneveadomi stneveadomi added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Oct 24, 2024
@stneveadomi
Copy link
Owner

stneveadomi commented Dec 10, 2024

Sorry for just getting back to this, been busy with life. Hopefully, I get to these issues ASAP.

@stneveadomi stneveadomi self-assigned this Dec 10, 2024
@stneveadomi
Copy link
Owner

Having a hard time reproducing this. After reviewing the code, we do properly subscribe to the file update events. I fear that this may be an issue of the extension host crashing silently as we... hug it to death.

Can you confirm that this is still persisting for you in the latest VS Code @Helyk ?

I was doing some high count rules on 1.95 of VS Code and it seemed a lot more resilient. However, I will see if I can get it to crash and hopefully we can improve performance / display a warning if it does crash.

@stneveadomi
Copy link
Owner

Confirmed Single Line works
Code_DFYyuhZ1rJ

Multi-line... let me work on that.

@Helyk
Copy link
Author

Helyk commented Dec 11, 2024

Hi. Glad that you're back to it. I'm on v1.95.3, this issue still reproduces for me.

@Helyk
Copy link
Author

Helyk commented Dec 11, 2024

This is what I see at the moment.

image
image

@Helyk
Copy link
Author

Helyk commented Dec 11, 2024

I'll try to test it later today on a smaller file with a single-line rule.

@Helyk
Copy link
Author

Helyk commented Dec 11, 2024

Tried, didn't work. It's a separate window so if it died or hanged in the other window it shouldn't be affecting this one, I think.

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants