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

Find references with multiple projects with same assembly name #8096

Commits on Jan 26, 2016

  1. Update FindReferencesTests.TestAsync to allow multiple cursor positions

    If there's multiple cursor positions in the test, each is used for
    a find references operation and the output of each result must match
    the marked spans. This is useful for linked file scenarios where the
    results should be same no matter which linked document it comes from.
    jasonmalinowski committed Jan 26, 2016
    Configuration menu
    Copy the full SHA
    674bdeb View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2016

  1. Allow specifying of linked files by project name too

    Right now you can specify linked files by assembly name, but that's not
    helpful if you want to test with two projects with the same assembly
    name in the first place.
    jasonmalinowski committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    1e92929 View commit details
    Browse the repository at this point in the history
  2. Switch ProjectReference to specify by project name instead of assembl…

    …y name
    
    The default case for projects not specifying a name is still to use
    the assembly name, so this doesn't break existing tests.
    jasonmalinowski committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    8f0d7a2 View commit details
    Browse the repository at this point in the history
  3. In FindReferencesTests.TestAsync, prefix file names with the path

    This doesn't change the behavior of any tests, but it does make it
    easier to understand what is going on when a test with linked files
    fails.
    jasonmalinowski committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    debe2f3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    aa63af9 View commit details
    Browse the repository at this point in the history
  5. Correctly handle finding symbols with duplicate assembly names

    Before this change, if you had two projects that had the same assembly
    name, you might get weird results from find references. Internally it
    used assembly name as a cache key for dependent projects, and so as long
    as the two projects with same assembly name had different dependent
    projects, we might not actually search all the projects we need to in
    your solution.
    
    Further, if you had the same linked file in both of these projects,
    we wouldn't search all projects that had it linked. This was because
    the LinkedFileReferenceFinder would correcty find all the symbols in
    linked projects, but the engine would then dedup the list calling those
    equal because once again the assembly names were equal. We make a
    decision here that when searching for symbols, symbols from source
    should never be deduplicated across projects that define them, but
    we will still merge metadata symbols as a single referenced symbol.
    There is an argument that we should also split up metadata symbols as
    well, but many consumers might find it very surprising that suddenly
    they get N referenced symbols in the result if there are N projects
    in the solution. For now, we'll maintain the result there.
    
    Fixes issue dotnet#3351.
    jasonmalinowski committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    85c5a7c View commit details
    Browse the repository at this point in the history
  6. Update FindSourceDefinitionAsync to chase through retargeted symbols

    FindSourceDefinitionAsync, when presented with a source symbol, would
    immediately return that symbol. If the source symbol is a retargeted
    source symbol, we were still returning that symbol instead of returning
    the "original" definition in the other source assembly. This changes the
    behavior to now return the original source assembly, a behavior which
    seems more consistent and allows FindSourceDefinitionAsync to be used
    in scenarios where we care about IAssemblySymbol identity.
    jasonmalinowski committed Jan 27, 2016
    Configuration menu
    Copy the full SHA
    4c49bf2 View commit details
    Browse the repository at this point in the history