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?]: ScopeSearchToAssembly includes assemblies which also start with the same assembly name #3064

Closed
just-ero opened this issue Aug 26, 2023 · 2 comments
Labels
Milestone

Comments

@just-ero
Copy link

just-ero commented Aug 26, 2023

Steps to reproduce

  1. Load two assemblies where one begins with the same name as the other; i.e. FooAssembly.dll and FooAssembly-Other.dll
  2. Search for a type or member name which matches in both assemblies.
  3. Scope the search to FooAssembly.dll via inassembly:FooAssembly.

Expected Behavior

Only results from FooAssembly.dll are be displayed.

Actual Behavior

Results from FooAssembly-Other.dll are also displayed.
This is relevant for example when decompiling a Unity game's Assembly-CSharp.dll where results from Assembly-CSharp-firstpass.dll are also displayed.

Details

  • Product in use: ILSpy
  • Version in use: 8.1.0.7455
@just-ero just-ero added the Bug label Aug 26, 2023
@siegfriedpammer siegfriedpammer added this to the 8.2 milestone Oct 23, 2023
@siegfriedpammer
Copy link
Member

While I can see your point, I think this is by design, since everything uses sub-string matching by default. Maybe we would need something like inassembly:=FooAssembly to denote whole-string matching?

@dgrunwald
Copy link
Member

dgrunwald commented Oct 23, 2023

I don't think new syntax is the solution; personally I can't even remember our existing syntax.

Different idea: adjust the sorting of search results, so that exact matches are preferred.

Or maybe allow including the file extension inassembly:FooAssembly.dll, that way it wouldn't match FooAssembly-Other.dll.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2024
mattsh247 pushed a commit to mattsh247/ILSpy that referenced this issue Jul 30, 2024
…lso try to match the filename when applying the "inassembly:" search filter.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants