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

Make TerminologyCache return non-mutable ValidationResult and ValueSetExpansionOutcome #1705

Open
dotasek opened this issue Jul 26, 2024 · 1 comment
Assignees

Comments

@dotasek
Copy link
Collaborator

dotasek commented Jul 26, 2024

As noted in #1700, results retrieved from the TerminologyCache can be mutated. This should never be the case. Though the validation code may need to alter a ValidationResult or ValueSetExpansionOutcome, it must do this in a way that does not change the cached object, which can impact future validations.

Making immutable versions of ValidationResult and ValueSetExpansionOutcome could make the code safer by throwing exceptions where returned objects are modified.

@grahamegrieve
Copy link
Collaborator

there's no way to do this other than manually, right? And what other things do we cache where we need to worry about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants