cqf-tooling icon indicating copy to clipboard operation
cqf-tooling copied to clipboard

Items in bundles shift with each run of the refresh operation

Open rob-reynolds opened this issue 2 years ago • 0 comments

Subsequent runs of the refresh operation create phantom/false diffs in diff tools because location within the file has changed even thought the content/value hasn't.

Steps to reproduce the behavior:

  1. run the refresh operation
  2. save the resulting bundle somehow (commit to repo)
  3. run the refresh operation again, without changing anything
  4. compare the resulting file with the previous file
  5. you will see a difference even though nothing has changed because the item has shifted positions

Expected behavior If nothing has changed the diff should not show anything has changed, i.e., the content/value should not change locations in the bundle.

Desktop (please complete the following information):

  • OS: Windows
  • Java Version: 1.8.0_311

Additional context This can be accomplished by using ordered hashsets in java (instead of non-ordered hashsets), i.e. hashsets that guarantee the same ordering given the same hash.

rob-reynolds avatar Mar 26 '22 16:03 rob-reynolds