Skip to content

Undo of "push all types to archive" does not fully work #8422

Description

@meithecatte

Version and Platform (required):

  • Binary Ninja Version: 6.0.10474-dev Ultimate (c9ea4d90)
  • Edition: Ultimate
  • OS: Arch Linux
  • CPU Architecture: x64

User story:
Pushing a type to an archive is used to do two different things:

  • adding a new type to the type archive, and
  • synchronizing changes between the two copies of a type
    Because of this, I occasionally find myself accidentally clicking on "push all types to archive", when I want to sync changes in all types that I have already added to the archive, only to immediately realize that this also adds all the types that weren't in the archive before.

Ultimately, this wouldn't be too bad, if this action was easily undone. However...

Bug Description:
After undoing "push all types to archive", the status of "has this type been modified, and does it need to be pushed and/or pulled", gets messed up.

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
0. Create a new type archive, say testing.bnta

  1. Create two empty structs, e.g. aaatest1 and aaatest2
  2. Right click on aaatest1 and select "push types to archive", choosing testing.bnta when prompted
  3. Add a new field to aaatest1, and observe that a "this type needs to be pushed" up-arrow icon appears next to it
  4. Right click on aaatest1 and select "push all types to archive", again choosing testing.bnta if prompted
  5. Gah! Now aaatest2 is in the type archive. Press ctrl+Z.
  6. Observe that a "merge conflict" up-and-down arrow icon now appears next to aaatest1
  7. Moreover, note that while aaatest2 is not linked as being in the type archive anymore (no chain link icon), a copy of it is still present in the type archive.

Expected Behavior:
I expected Undo to return the type archive to the state from before the undone action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions