Skip to content

Remove ifdefs from winforms#3169

Merged
RussKie merged 6 commits intodotnet:masterfrom
hughbe:ifdefs
May 26, 2020
Merged

Remove ifdefs from winforms#3169
RussKie merged 6 commits intodotnet:masterfrom
hughbe:ifdefs

Conversation

@hughbe
Copy link
Copy Markdown
Contributor

@hughbe hughbe commented Apr 30, 2020

Proposed Changes

  • Remove never defined ifdefs from winforms
  • Remove always defined ifdefs from winforms

The remaining list is

  • DEBUG
  • DEBUG_LAYOUT
  • DEBUG_PAINT
  • DEBUG_PAINT_ANCHOR
  • DEBUG_UPDOWN
  • FINALIZATION_WATCH
  • GDI_FINALIZATION_WATCH
  • LAYOUT_PERFWATCH
  • PBRS_PAINT_DEBUG
  • TRACK_HDC

What should we do with these? I didn't want to delete as they may be useful, but all the above except DEBUG (which should stay, obviously), are never used define. Should we delete this code?

Fixes #39

Microsoft Reviewers: Open in CodeFlow

@hughbe hughbe requested a review from a team as a code owner April 30, 2020 11:37
@ghost ghost assigned hughbe Apr 30, 2020
@hughbe hughbe force-pushed the ifdefs branch 5 times, most recently from 6766485 to 6db91b7 Compare April 30, 2020 14:50
RussKie
RussKie previously approved these changes May 1, 2020
Copy link
Copy Markdown
Contributor

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

👍

@RussKie
Copy link
Copy Markdown
Contributor

RussKie commented May 1, 2020

@Tanya-Solyanik any objections?

@RussKie RussKie added waiting-review This item is waiting on review by one or more members of team code cleanup cleanup code for unused apis/properties/comments - no functional changes. labels May 1, 2020
@hughbe
Copy link
Copy Markdown
Contributor Author

hughbe commented May 1, 2020

Also would appreciate some suggestions on the remaining ifdefs listed above. Also, this fixes #39

@codecov
Copy link
Copy Markdown

codecov bot commented May 7, 2020

Codecov Report

Merging #3169 into master will decrease coverage by 36.96293%.
The diff coverage is 100.00000%.

@@                 Coverage Diff                  @@
##              master       #3169          +/-   ##
====================================================
- Coverage   98.54350%   61.58057%   -36.96293%     
====================================================
  Files            420        1286         +866     
  Lines         197872      451912      +254040     
  Branches        2756       39504       +36748     
====================================================
+ Hits          194990      278290       +83300     
- Misses          2329      168260      +165931     
- Partials         553        5362        +4809     
Flag Coverage Δ
#Debug 61.58057% <100.00000%> (-36.96293%) ⬇️
#production 32.79798% <100.00000%> (?)
#test 98.53340% <ø> (-0.01010%) ⬇️

@JeremyKuhne
Copy link
Copy Markdown
Member

Keep #ifdef DEBUG. We should create an issue to consider how we want to track finalization so that we can shake out issues in disposal as we're clearly having problems in our test runs (to replace the two FINALIZATION_WATCH defines).

@codecov
Copy link
Copy Markdown

codecov bot commented May 22, 2020

Codecov Report

Merging #3169 into master will decrease coverage by 30.86467%.
The diff coverage is 100.00000%.

@@                 Coverage Diff                  @@
##              master       #3169          +/-   ##
====================================================
- Coverage   64.68383%   33.81916%   -30.86468%     
====================================================
  Files           1318         888         -430     
  Lines         484206      253723      -230483     
  Branches       39910       36766        -3144     
====================================================
- Hits          313203       85807      -227396     
+ Misses        165627      163178        -2449     
+ Partials        5376        4738         -638     
Flag Coverage Δ
#Debug 33.81916% <100.00000%> (-30.86468%) ⬇️
#production 33.81916% <100.00000%> (+0.00861%) ⬆️
#test ?

RussKie
RussKie previously approved these changes May 26, 2020
Copy link
Copy Markdown
Contributor

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

👍

// See the LICENSE file in the project root for more information.

// #define TRACK_HDC
// #define GDI_FINALIZATION_WATCH
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like this was missed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think FINALIZATION_WATCH is now back in as requested

Delete remaining except FINALIZATION-WATCH

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is being removed in other places though.
I created #3348 to track/reinstate finalization watch.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, didn't notice it was inconsistent, probably should be updated to either remove all of them or keep all of them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thats what I did :)

@RussKie RussKie removed the waiting-review This item is waiting on review by one or more members of team label May 26, 2020
@RussKie RussKie mentioned this pull request May 26, 2020
@hughbe
Copy link
Copy Markdown
Contributor Author

hughbe commented May 26, 2020

Updated

@RussKie

This comment has been minimized.

@codecov
Copy link
Copy Markdown

codecov bot commented May 26, 2020

Codecov Report

Merging #3169 into master will increase coverage by 33.94661%.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##              master       #3169          +/-   ##
====================================================
+ Coverage   64.68383%   98.63044%   +33.94660%     
====================================================
  Files           1318         430         -888     
  Lines         484206      230439      -253767     
  Branches       39910        3142       -36768     
====================================================
- Hits          313203      227283       -85920     
+ Misses        165627        2523      -163104     
+ Partials        5376         633        -4743     
Flag Coverage Δ
#Debug 98.63044% <ø> (+33.94660%) ⬆️
#production ?
#test 98.63044% <ø> (-0.05208%) ⬇️

@RussKie
Copy link
Copy Markdown
Contributor

RussKie commented May 26, 2020

...and it passed 😕

@RussKie RussKie merged commit 832abd6 into dotnet:master May 26, 2020
@ghost ghost added this to the 5.0 Preview6 milestone May 26, 2020
@hughbe hughbe deleted the ifdefs branch May 26, 2020 11:49
@ghost ghost locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

code cleanup cleanup code for unused apis/properties/comments - no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused managed defines from S.W.F code

4 participants