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

Strange "TooManyChanges" exception (in cdm) #155

Open
tombrus opened this issue Jan 29, 2024 · 0 comments
Open

Strange "TooManyChanges" exception (in cdm) #155

tombrus opened this issue Jan 29, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tombrus
Copy link
Contributor

tombrus commented Jan 29, 2024

The following rule triggers it:

rule if (propertyValue != null) { 
  propertyValue.result := derivedValue; 
  propertyValue.causes := assignments.reasonRefs.distinct.copy; 
}

the following change solves it:

rule if (propertyValue != null) { 
  propertyValue.causes := assignments.reasonRefs.distinct.copy; 
} 
rule if (propertyValue != null) { 
  propertyValue.result := derivedValue; 
}

there seem to be other solutions like changing the order of the assignments, adding .toList after the copy or adding some tracing of assignments.reasonRefs.distinct.copy in a local variable.

We discovered this in a private repo (Osteoporose), see revision e39faec67a5558fd3076b66ed2a2aba8e4a8b10c.
The above change in cdm (also private) is in 59848d85f759daa0c83500b95bbf6ebcb51a5c1f.

@tombrus tombrus added the bug Something isn't working label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants