-
Notifications
You must be signed in to change notification settings - Fork 865
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
Improving "internal reload" during project reload #7748
Conversation
42dac65
to
664269f
Compare
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.
No objections from me.
ide/project.dependency/src/org/netbeans/modules/project/dependency/ProjectReload.java
Outdated
Show resolved
Hide resolved
...va.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/TextDocumentServiceImpl.java
Outdated
Show resolved
Hide resolved
ide/project.dependency/src/org/netbeans/modules/project/dependency/reload/Reloader.java
Outdated
Show resolved
Hide resolved
664269f
to
2d925f2
Compare
Rebased on latest master; @mbien review comments addressed. |
ok thanks, don't forget to squash the third commit into the other commits before merge though. |
Sure, waiting until Mon for other possible review comments + fixes. |
2d925f2
to
9db7581
Compare
Fixes merged into 2nd commit; prepare for merge. |
Seems awkward... but sometimes events are delivered in the middle of a project loading process. The API checks the project's state at the end for quality and/or consistency - and that can cause spurious errors about project reloads while reading it. This PR improves stability by allowing a recovery - but at the same time if a reload would be repeated again because of file changes, the
ProjectReload.withProjectState()
fails indicating that project is being modified, as it was before. Similar approach was already implemented for the case theProjectReloadImplementation
requested a retry: one is OK, but the same (super)set repeated again will result in an error.During investigation, I needed quite detailed logging, so I've added that as a separate commit; the "logging" commit should bring no functional changes, just diagnostics.