-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix #2315: fine grain marker tree computation #2316
Conversation
@marcdumais-work please try, it turned out that:
|
I think we should even consider not storing markers in storage at all. It might auto-fix a couple of issues we have with stale markers. |
@svenefftinge @marcdumais-work I've removed storing markers by default, a specialization of marker manager can decide on their own. For cases which I know it does not make sense to store them, but can imagine that it can be useful for breakpoints for example. |
will try this PR now, thanks @akosyakov |
True, e.g. for TypeScript, where the markers are created by the LS when a file is opened and cleared when it's closed. In that case, the markers will be re-created when we reload a workspace, since the opened files will be restored. When we have markers created during a build, we will need to re-trigger the build to get back the markers after a reload, I think? Or have the build component itself res/store the markers maybe? |
The problems widget should also not store its state. |
In VS Code they don't store markers and expect that a language server reports all of them each time. For us, it should be safe to assume the same. Also, I see that Java LS reports them each time. |
This might be incidental. From a previous discussion, I remember that the jdt creates an eclipse workspace each time Theia is started, IIRC to avoid issues with (Eclipse) WS corruption. If not for that, it might not build each time. |
I tried the PR and it's really fast now - as fast as jdt can provide the problems, it seems. I noticed a bug: when I toggle the Problems view, it comes back empty. Similar, if I start with Problems view not present and open it later, it's also empty. |
They have to report each time, otherwise, there won't be problem markers in VS Code.
thanks! i will have a look |
Actually, it's
We can test it easily, by using a fixed path for the eclipse workspace, and see if the markers are reported again. AFAIK resource markers are persisted in eclipse, might be that there are reused. |
@AlexTugarev do you know where that config is, that I could point to a fixed path? |
@AlexTugarev Thanks! |
I did this and indeed the markers are reported again after F-E reload. It did not feel as the markers were re-used, as they came-in at the same pace over a minute or two, like when a new workspace is used. |
ec169c1
to
5b9623c
Compare
@marcdumais-work I've removed storing the state of the problems view. Could you try again? it could be that an issue with an empty problems view was caused by a race between layout restoration and markers from Java LS. If you can reliably reproduce please describe how. I struggle to reproduce it. |
ok, will re-test with latest |
I still have the issue. For me it's very simple to reproduce. Open the Problems view and open a .java file. Wait until the LS is done reporting the issues it found. Then close and re-open the view: Additionally, I had not noticed before, it looks like when the view is filling-up, we are missing some refresh, that makes it so that we do not see more than the markers for the originally opened file. You can see both in this video: |
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
5b9623c
to
650e3a2
Compare
Got you. I was collapsing the view, not closing it. Please pull and try again, it should be fixed. thanks!
I did it on purpose that the view is not rerendered while Java LS is spamming with diagnostics. In practice after initial diagnostics reported there won't be delays as you type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTGM. Performance with a lot of problem markers from lots of files is amazing with this PR!
No description provided.