Skip to content

Throwing FormatException when a required property from Microsoft.Extensions.DependencyModel is empy - #60842

Merged
eerhardt merged 18 commits into
dotnet:mainfrom
filipjelic:SettingNullableTargetName
Nov 2, 2021
Merged

Throwing FormatException when a required property from Microsoft.Extensions.DependencyModel is empy#60842
eerhardt merged 18 commits into
dotnet:mainfrom
filipjelic:SettingNullableTargetName

Conversation

@filipjelic

@filipjelicfilipjelic commented Oct 25, 2021

Copy link
Copy Markdown
Contributor

Throwing FormatException when a required property is null/empty.
This enables removal of all ! operations addressed in #58139 (comment)

@ghostghost added area-DependencyModel community-contribution Indicates that the PR has been added by a community member labels Oct 25, 2021
@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @eerhardt
See info in area-owners.md if you want to be subscribed.

Issue Details

Updating property types (strings) to be nullable for:

  • class Target property Name
  • class TargetLibrary property Name
  • class RuntimeTargetEntryStub property Path

This enables removal of all ! operations addressed in #58139 (comment)

Author:filipjelic
Assignees:-
Labels:

area-DependencyModel, community-contribution

Milestone:-

@dnfadmin

dnfadmin commented Oct 25, 2021

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@filipjelic
filipjelic marked this pull request as draft October 25, 2021 23:57
@filipjelic
filipjelic marked this pull request as ready for review October 26, 2021 00:19
@filipjelicfilipjelic changed the title Setting nullable properties and removing null forgiving operator from Microsoft.Extensions.DependencyModelSetting nullable string properties from Microsoft.Extensions.DependencyModelOct 26, 2021
@runfoapprunfoappBot mentioned this pull request Oct 26, 2021
@filipjelic

Copy link
Copy Markdown
ContributorAuthor

@eerhardt Ready for review.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like a good start, @filipjelic. Thanks.

I have left some comments.

Comment threadsrc/libraries/Microsoft.Extensions.DependencyModel/src/Dependency.cs Outdated
Comment threadsrc/libraries/Microsoft.Extensions.DependencyModel/src/ResourceAssembly.cs Outdated
Comment threadsrc/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFallbacks.cs Outdated
Comment threadsrc/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFile.cs Outdated
Comment threadsrc/libraries/Microsoft.Extensions.DependencyModel/src/TargetInfo.cs Outdated
@filipjelic

Copy link
Copy Markdown
ContributorAuthor

@eerhardt Code and unit tests have been updated accordingly.
Thanks!

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good. Just a few last comments to fix up.

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks for the contribution @filipjelic!

@filipjelicfilipjelic changed the title Setting nullable string properties from Microsoft.Extensions.DependencyModelThrowing FormatException when a required property from Microsoft.Extensions.DependencyModel is empyOct 30, 2021
@filipjelicfilipjelic changed the title Throwing FormatException when a required property from Microsoft.Extensions.DependencyModel is empyThrowing FormatException when a required property from Microsoft.Extensions.DependencyModel is empyOct 30, 2021
@eerhardt
eerhardt merged commit a3f31e9 into dotnet:mainNov 2, 2021
@filipjelic
filipjelic deleted the SettingNullableTargetName branch November 2, 2021 19:38
@ghostghost locked as resolved and limited conversation to collaborators Dec 10, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-DependencyModelcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@filipjelic@dnfadmin@eerhardt