Question: Priority of searching source
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to know the priority that the source link searches a source.
I encounter this scenario.
I have a repository. I have two branches A and B.
On Branch A, I create a NuGet package. I change the code, bump the version, pack it, then put it on a LocalNuget folder. Then I switch the branch from A to B.
On Branch B, there is a client that reference the NuGet package. I bump the version of the NuGet package that just I created, then using VS; I select Go To Definition to see the change I made on the NuGet package. However, the code looks old.
I eventually noticed this fact. Instead of the same repository, I create the client (same as Branch B code) on the other place on my local PC, then the reference the new version with The repository Keeps on the Branch A, then I can see the latest source code.
When I use the NuGet Package Explorer, the NuGet package has Repository: section as Type git and Url is GitHub URL. Also, I see the Health: Source Link: said Contains untracked source(obj) with ! mark.
According to the fact, How source link search the target source code for the code that is not pushed to the Remote? Something like this? Could you help me to understand the behavior?
My guess is:
1. Search the GitHub that has the same commit as NuGet.
2. Search the local source directory that I build the NuGet package with the commit.
3. If the source link can't find the commit, the source link references the local source directory latest commit.
Am I correct?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.