sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Handle error when status runtime information cannot find version in productCollection.

Open AraHaan opened this issue 3 years ago • 4 comments

Fixes https://github.com/dotnet/sdk/issues/26509.

Changes:

  • Change the .First() calls that operate on productCollection to FirstOrDefault() and use nullable annotate the return value to make them nullable.
  • Added a new localizable string resource.

AraHaan avatar Jul 18 '22 19:07 AraHaan

Try/Catches obscure the problem - the API in the various BundleIs* calls from the bundle output writer should be changed to return a nullable bool instead so that we can accurately detect the non-existence of the requested runtime in the ProductCollection. Then for those 'not found' cases we can use the message you've provided.

baronfel avatar Jul 27 '22 12:07 baronfel

Alright, about to switch it to using the nullable bools option instead of try/catch. Although I am not sure how to fix the false compile errors with it thinking that the translation files need to be updated (as I updated them manually).

If anyone could help fix that, I would be ok with it.

Edit: I have no squashed the commits into a single commit. I also think that now the only thing that needs to be done are the translations that gets run (I think) by the CI after merge.

AraHaan avatar Aug 07 '22 18:08 AraHaan

Hopefully I finally fixed the nullable issues.

AraHaan avatar Aug 12 '22 02:08 AraHaan

I think the current failures is unrelated.

cc: @baronfel, @kant2002

AraHaan avatar Aug 12 '22 04:08 AraHaan

Is this planned to be merged soon before 7.0.100 stable is released to the public?

AraHaan avatar Aug 17 '22 09:08 AraHaan

Thank you for your contribution. Retargeted to the 7.0.1xx branch and set to automerge. This will be included in 7.0.1xx-rc2.

marcpopMSFT avatar Aug 17 '22 21:08 marcpopMSFT

When can we see this in the daily builds of the rc.2 sdks? Currently I do not see it in the one listed under dotnet/installer to try it out locally from there.

AraHaan avatar Aug 21 '22 03:08 AraHaan