-
Notifications
You must be signed in to change notification settings - Fork 696
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
When possible, use Reference6 to read ProjectReference metadata such as ReferenceOutputAssembly
#4327
Conversation
ReferenceOutputAssembly
...s/NuGet.PackageManagement.VisualStudio/ProjectServices/VsCoreProjectSystemReferenceReader.cs
Outdated
Show resolved
Hide resolved
2481252
to
f8b28e8
Compare
...s/NuGet.PackageManagement.VisualStudio/ProjectServices/VsCoreProjectSystemReferenceReader.cs
Outdated
Show resolved
Hide resolved
...s/NuGet.PackageManagement.VisualStudio/ProjectServices/VsCoreProjectSystemReferenceReader.cs
Outdated
Show resolved
Hide resolved
bb73c43
to
fd78b58
Compare
@NuGet/nuget-client Can I please get a review here? |
|
||
static string GetReferenceMetadataValue(Array metadataElements, Array metadataValues) | ||
{ | ||
if (metadataElements == null || metadataValues == null || metadataValues.Length == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add metadataElements.Length == 0
condition also?
Another question that I have is, metadataElements
argument value is not used except for null or empty checks. Do we need this parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just remove metadataElements.
...s/NuGet.PackageManagement.VisualStudio/ProjectServices/VsCoreProjectSystemReferenceReader.cs
Show resolved
Hide resolved
...s/NuGet.PackageManagement.VisualStudio/ProjectServices/VsCoreProjectSystemReferenceReader.cs
Outdated
Show resolved
Hide resolved
...s/NuGet.PackageManagement.VisualStudio/ProjectServices/VsCoreProjectSystemReferenceReader.cs
Outdated
Show resolved
Hide resolved
fd78b58
to
8a108ba
Compare
Bug
Fixes: NuGet/Home#11163
Regression? Last working version:
Description
This is an attempt to the fix the UI delay caused by the double walk of the references..
I setup a test repo with the following relevant projects.
The project references are as follows:
LegacyPackagesConfig.csproj
=> CPlusPlus.vcxproj
=> LegacyMSbuildProj.msbuildproj
=> Stateless.csproj
ServiceFabric.sfproj
=> Stateless.csproj
LegacyMSbuildProj.msbuildproj
=> Stateless.csproj
When walking each of the 3 above projects for ProjectReference, the following happens:
LegacyPackagesConfig
project references can be cast to Reference6.ServiceFabric
project references can be cast to Reference6, but can be cast to Reference3.LegacyMSbuildProj
project references can be cast to Reference6, but can be cast to Reference3.The proposal is the following:
Currently the behavior is:
The first part is the expensive part.
The proposal is:
Reference6
, then just use the metadata from there, otherwise useReference3
and keep track of the fact that we couldn't get the metadata.Reference6
, walk the tree for the excluded projects the expensive way to avoid any functional regressions (which are frankly, pretty unlikely, but we can't break the experience.)This should fix the UI delay for most project types.
@lifengl @davkean
Based on the above findings, we'd need CPS to implement Reference6 - https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1431168
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation