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

Clear caches with specified DocumentState also for deleted documents #1712

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

JohannesMeierSE
Copy link
Contributor

This PR is a follow-up for #1659.

DocumentCache and WorkspaceCache don't clear their caches for deleted documents, if a DocumentState is specified.
This behaviour was documented for DocumentCache, but in my eyes ...

  • ... content for deleted documents is not valid in any case and should be removed from the cache as well.
  • ... it is unexpected/surprising, that deleted documents are considered without DocumentState and not considered with DocumentState.
  • ... it requires additional effort by users of these caches, if deleted documents should clear the cache with a given DocumentState. It is better to support this use case directly.

If there are use cases nevertheless, I propose to introduce another boolean flag to explicitly control the behaviour for deleted documents.

Copy link
Member

@msujew msujew 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, thanks 👍

@msujew msujew merged commit dee64f8 into eclipse-langium:main Oct 14, 2024
4 checks passed
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.

2 participants