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

Set up Sdk Dependency Model Ids to ignore version information #3205

Merged
merged 2 commits into from
Feb 1, 2018

Conversation

natidea
Copy link
Contributor

@natidea natidea commented Jan 31, 2018

Version was unset for earlier releases, but is set for the first time in .NET Core 2.1 (by dotnet/sdk#1572) creating problems matching SdkDependencyModel to NuGet Package references. See #3184 (comment) for more details

This fix overrides base class implementation and ignores version information. It turns out this approach is used in other derived classes as well. I also considered a fix in which the broken filter checks for SDK using an Id without version and one with version, but this approach seems more consistent with other models in this project.

At this point, it is unclear why the base class implementation needs to include version in its ID since many of its derived classes ignore version or leave it empty. But since this is an escrow fix, I'll avoid making a sweeping change.

Customer scenario

Customers using .NET Core 2.1 SDK see unresolved warning in dependency node, and cannot expand SDK to see its packages

Bugs this fixes:

Fixes #3184
Fixes 556559

Workarounds, if any

Close and reopen solution often resolves this, but this depends on the order of dataflows

Risk

Low, previous SDKs did not include version information either

Performance impact

Low, this just overrides a base class implementation

Is this a regression from a previous update?

Regression from .NET Core 2.0 to .NET Core 2.1 SDK

Root cause analysis:

.NET Core SDK team probably noticed version was missing and added it. 2.1 is still in early preview so problems like this are being weeded out.

How was the bug found?

Test team

/cc @dotnet/project-system

Version was unset for earlier releases, but is set for the first time in .NET Core 2.1 creating problems matching SdkDependencyModel to NuGet Package references.
@natidea
Copy link
Contributor Author

natidea commented Feb 1, 2018

Shiproom Approved to merge via 556559
/cc @Pilchie @dotnet/project-system for more signoffs

{
get
{
if (_id == null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really worth it? It looks like OriginalItemSpec is passed to the base already constructed. Does the property do anything other than just return it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, OriginalItemSpec does not change so we should just return it. I just copied the pattern used in the other derived classes.

Copy link
Contributor

@tmeschter tmeschter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, modulo @Pilchie's concerns about the new field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants