Skip to content

Type Library types are imported from parsing even if I cancel #5222

@CouleeApps

Description

@CouleeApps

Version and Platform (required):

  • Binary Ninja Version: 4.1.4986-dev
  • OS: macOS
  • OS Version: 14.2
  • CPU Architecture: M1

Bug Description:
When I retype a variable and I start typing the name of a type in a Type Library, it gets automatically imported for me to use. This is neat and all but it actually gets imported before I'm done and even if I cancel there is no way to unimport it. This is extra weird because if there is a type which is a substring of my type it gets imported (presumably because each subsequent letter typed tries to import types) and now I have all of those.

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Open any windows binary
  2. Click any variable type
  3. Start retyping variable to IActiveScriptError64* but don't confirm, and type slowly
  4. Cancel retyping
  5. Observe IActiveScript, IActiveScriptError, and IActiveScriptError64 are all imported

Expected Behavior:
I expected types to only get imported if I actually confirmed my usage of them

Additional Information:
Due to Analysis::ParseTypeString automatically importing library types, combined with the type dialog checking if your type is valid when you are typing. Likely need a way to tell Analysis::ParseTypeString "hey wait this isn't being used don't import types"

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions