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

Ensure <Nullable>enable<Nullable> on System.IO.Packaging and S.Resources.Extensions #41731

Merged
merged 11 commits into from
Sep 9, 2020

Conversation

krwq
Copy link
Member

@krwq krwq commented Sep 2, 2020

Fixes: #41696

Looking at the XLS and conversation seems like this is all that's left to do there

@krwq krwq requested a review from a team September 2, 2020 08:03
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@safern
Copy link
Member

safern commented Sep 2, 2020

@krwq these are the only projects we we're missing to enable nullable that we're annotated. However the spreadsheet has some other differences in between ref and src. Are you going to tackle those as well?

@krwq
Copy link
Member Author

krwq commented Sep 2, 2020

@safern I couldn't see any specific issues on the spreadsheet, the projects there didn't seem to have src annotated (except for perhaps few files from shared directory)

@buyaa-n
Copy link
Contributor

buyaa-n commented Sep 3, 2020

Did not updated diff in namespaces

  1. System.ComponentModel.Annotations by assuming we didn't annotated the src completely for a reason (not sure who annotated that, need to clarify)
  2. System.Data.Common same reason, not sure if we want to make the src and ref same
  3. System.ComponentModel.EventBasedAsync cannot even find this ref and src, which project are they?
  4. System.Data.OleDb Also src missing some annotation, might be on purpose
  5. System.IO.Packaging @safern said it annotated correctly, we missed to add enable on the ref
  6. System.Resources.Extensions @safern said it annotated correctly, we missed to add enable on the ref

few diffs were not about nullable annotation, the difference between parameter name or accessor

@safern
Copy link
Member

safern commented Sep 3, 2020

System.ComponentModel.Annotations by assuming we didn't annotated the src completely for a reason (not sure who annotated that, need to clarify)
System.Data.Common same reason, not sure if we want to make the src and ref same

@roji do you recall why?

System.ComponentModel.EventBasedAsync cannot even find this ref and src, which project are they?

https://github.com/dotnet/runtime/tree/master/src/libraries/System.ComponentModel.EventBasedAsync/src

Thanks, for working on this, @buyaa-n

@buyaa-n
Copy link
Contributor

buyaa-n commented Sep 3, 2020

System.ComponentModel.EventBasedAsync cannot even find this ref and src, which project are they?

https://github.com/dotnet/runtime/tree/master/src/libraries/System.ComponentModel.EventBasedAsync/sr

I checked that, it doesn't have BeginInvoke(object? sender, ProgressChangedEventArgs! e, AsyncCallback callback, object object); and Invoke(object? sender, ProgressChangedEventArgs! e); methods, maybe that is generated for delegates, then i will just fix delegates signature

@safern
Copy link
Member

safern commented Sep 3, 2020

Yeah the problem is: public delegate void ProgressChangedEventHandler(object! sender, ProgressChangedEventArgs! e)

@buyaa-n
Copy link
Contributor

buyaa-n commented Sep 3, 2020

Fixed System.Data.Common diffs, for some of them source looks correct, but for some ref looks correct, so updated as whichever feels correct to me, please review. Now only 2 ns left, System.ComponentModel.Annotations and System.Data.OleDb, these are not within group 9 => by my understanding, we didn't intend to annotate their src completely so the diff might be OK CC @stephentoub,

@@ -863,7 +863,7 @@ public sealed partial class DataTableReader : System.Data.Common.DbDataReader
public override System.Type GetProviderSpecificFieldType(int ordinal) { throw null; }
public override object GetProviderSpecificValue(int ordinal) { throw null; }
public override int GetProviderSpecificValues(object[] values) { throw null; }
public override System.Data.DataTable? GetSchemaTable() { throw null; }
public override System.Data.DataTable GetSchemaTable() { throw null; }
Copy link
Member

Choose a reason for hiding this comment

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

This looks wrong:
#41082
cc: @roji

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll revert this

Copy link
Member

@roji roji Sep 4, 2020

Choose a reason for hiding this comment

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

Sorry for the delayed response and thanks - yeah, this is wrong. GetSchemaTable should return nullable as in #41082.

Copy link
Member

Choose a reason for hiding this comment

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

This was changed back per #41731 (comment)

@jeffhandley
Copy link
Member

Once we have this finished up and merged into master, we'll submit it for Tactics Ask Mode approval for RC2:

  • Use the port bot to port this to release/5.0-rc2 (with a comment of /backport to release/5.0-rc2)
  • Fill out the PR template in the PR created by the bot
  • Label it with Servicing-consider
  • Then I'll send an email to Tactics to request approval
  • I suspect we'll talk about it during the Tactics meeting on Tuesday

@tarekgh
Copy link
Member

tarekgh commented Sep 3, 2020

Thanks @buyaa-n. the changes in System.Diagnostic.DiagnosticsSource looks good.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2020

Started backporting to release/5.0-rc2: https://github.com/dotnet/runtime/actions/runs/238588095

@safern
Copy link
Member

safern commented Sep 3, 2020

Applying: ActivityTagsCollection should implement IDictionary<string, object?>
/usr/bin/git push --force --set-upstream origin HEAD:backport/pr-41731-to-release/5.0-rc2
To https://github.com/dotnet/runtime
 + cc835beafa9...31405fa7873 HEAD -> backport/pr-41731-to-release/5.0-rc2 (forced update)
Branch 'backport/pr-41731-to-release/5.0-rc2' set up to track remote branch 'backport/pr-41731-to-release/5.0-rc2' from 'origin'.
Backport temp branch already exists, skipping opening a PR.

We need to re-open the PR.

@akoeplinger re-opening the PRs if the PR is not merged.

@safern
Copy link
Member

safern commented Sep 3, 2020

I couldn't re-open the PR. So I deleted the branch and will run the backport again.

/backport to release/5.0-rc2

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2020

Started backporting to release/5.0-rc2: https://github.com/dotnet/runtime/actions/runs/238597367

@krwq
Copy link
Member Author

krwq commented Sep 4, 2020

Changes from @buyaa-n look good to me

@roji
Copy link
Member

roji commented Sep 4, 2020

System.ComponentModel.Annotations by assuming we didn't annotated the src completely for a reason (not sure who annotated that, need to clarify)
System.Data.Common same reason, not sure if we want to make the src and ref same

@buyaa-n @safern yeah, I'm the one who annotated System.ComponentModel.Annotations (#39611), and also System.Data.{Odbc,OleDb} (#39597). Unless I've missed something both that and System.Data.Common should be fully annotated (src and ref) apart from dependencies on TypeConverter and XML. IIRC in at least some of these (especially Odbc/OleDb) I couldn't get errors/warnings for discrepancies between src and ref, so there may have been mismatches...

Are there outstanding issues with these projects (sorry, am a bit late to the party..)? If so I can take a look - feel free to ping me etc.

@buyaa-n
Copy link
Contributor

buyaa-n commented Sep 4, 2020

Unless I've missed something both that and System.Data.Common should be fully annotated (src and ref) apart from dependencies on TypeConverter and XML. IIRC in at least some of these (especially Odbc/OleDb) I couldn't get errors/warnings for discrepancies between src and ref, so there may have been mismatches...

@roji There is no error, we have run a tool to find diffs between ref and src and found some diff for those and other assemblies which we are trying to fix with this PR

Are there outstanding issues with these projects (sorry, am a bit late to the party..)? If so I can take a look - feel free to ping me etc.

There is only one issue related to this where the list of findings attached #41696. But no worries i believe we have covered all diffs with this PR, now its need a review

@buyaa-n
Copy link
Contributor

buyaa-n commented Sep 4, 2020

This must-have covered/fixed all diffs now (i will try to run @terrajobst's tool again), please review the fixes @safern @stephentoub @terrajobst

@buyaa-n
Copy link
Contributor

buyaa-n commented Sep 5, 2020

Sorry 😥, it was not covered everything updated left over diffs in:

  • System.Data.OleDb was not covered
  • System.IO.Packaging - after enabling nullable most of the diff gone but still there were some diff left

diff in System.Resources.Extensions were fixed after nullable enabled. Now it is covered all. Please review

Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

LGTM but please wait for other reviews.

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jeffhandley
Copy link
Member

Updating the backport PR to capture latest commits...

/backport to release/5.0-rc2

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2020

Started backporting to release/5.0-rc2: https://github.com/dotnet/runtime/actions/runs/245365329

@jeffhandley
Copy link
Member

Updating the backport PR to capture latest commit...

/backport to release/5.0-rc2

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2020

Started backporting to release/5.0-rc2: https://github.com/dotnet/runtime/actions/runs/245476791

@buyaa-n buyaa-n merged commit 3ac170a into dotnet:master Sep 9, 2020
@jeffhandley
Copy link
Member

One last backport to reflect this PR being merged.

/backport to release/5.0-rc2

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2020

Started backporting to release/5.0-rc2: https://github.com/dotnet/runtime/actions/runs/246826142

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some projects aren't enabled for nullable
8 participants