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

[BUG] Automatic update after Rule application destroys valid mappings #118

Open
arg0n1s opened this issue Jul 12, 2023 · 0 comments
Open
Assignees
Labels
bug Something isn't working
Projects

Comments

@arg0n1s
Copy link
Collaborator

arg0n1s commented Jul 12, 2023

Using the automatic update before rule application of non-zero mappings might (a) invalidate matches belonging to other rules, or (b) destroy/reset valid mappings and their variables.

  • E.g.: gipsApi.getSomeMapping().applyNonZeroMappings(); gipsApi.getSomeMapping2().applyNonZeroMappings(); gipsApi.getSomeMapping3().applyNonZeroMappings();

Without any parameter the applyNonZeroMappings-Method will update all matches/mappings prior to applying a rule.
In this example, running getSomeMapping2().applyNonZeroMappings() might destroy mappings of SomeMapping3 which is applied afterwards.

As a temporary fix, always use applyNonZeroMappings(false) to prevent any weird behaviour.

  • In the future, we should warn users whenever a rule application on a valid and non-zero mapping destroys a valid and non-zero mapping of another rule.
  • More importantly: Unrelated mappings should not be destroyed / reset by a simple update-call.
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
GIPS
Awaiting triage
Development

No branches or pull requests

1 participant