-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Refactor Progress #834
Refactor Progress #834
Conversation
Not ready yet. Depends on #836. |
This change adds a whole bunch of new warnings - everywhere where we use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 20 of 20 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ermshiperete)
SIL.Core/Progress/BackgroundWorkerState.cs, line 9 at r1 (raw file):
/// Long-running tasks can be written to take one of these as an argument, and use it to notify others of their progress /// </summary> // Should be deprecated - [Obsolete]
is there a recommended replacement for BackgroundWorkerState?
SIL.Core.Tests/Data/RecordTokenTests.cs, line 238 at r1 (raw file):
} public void Startup(IProgress state)
state
is no longer the best name. How about progress
.
SIL.Core.Tests/Progress/ConsoleProgressTests.cs, line 77 at r1 (raw file):
{ Thread.Sleep(1); }
minor: do you know why Thread.Sleep(2)
couldn't replace this whole method? Why we even need to pretend to do work?
- move Progress related classes in separate files - refactor ConsoleProgressTests to test what the name says - add comments to ProgressState classes that will eventually be deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 18 of 20 files reviewed, 3 unresolved discussions (waiting on @papeh)
SIL.Core/Progress/BackgroundWorkerState.cs, line 9 at r1 (raw file):
Previously, papeh wrote…
is there a recommended replacement for BackgroundWorkerState?
I'm not sure.
SIL.Core.Tests/Data/RecordTokenTests.cs, line 238 at r1 (raw file):
Previously, papeh wrote…
state
is no longer the best name. How aboutprogress
.
Turns out this method isn't used at all.
SIL.Core.Tests/Progress/ConsoleProgressTests.cs, line 77 at r1 (raw file):
Previously, papeh wrote…
minor: do you know why
Thread.Sleep(2)
couldn't replace this whole method? Why we even need to pretend to do work?
I guess we'll find out 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
Follow-up of the big nuget PR (#786)
This change doesn't deprecate ProgressState yet because it is still used in too many libpalaso classes, and deprecating it would add a whole bunch of new warnings when compiling libpalaso. Instead I'd recommend to replace the usage of ProgressState over time.
This change is