-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change ensures future modifications to FakeClock will not break users. However, this change does break current users who use FakeClock as an argument, return value, or embed it in a struct or interface. With limtied exception, build errors can be fixed by running: ``` $ grep -rl 'clockwork.FakeClock' /path/to/code_base | \ xargs sed -i 's/clockwork.FakeClock/*clockwork.FakeClock/g' ``` Other errors and their fixes are: - When returning a pointer to concrete type as a clockwork.FakeClock: return the pointer to concrete type. - When using FakeClock in an interface composition: relace with the functions required by the interface. - When using FakeClock as an argument, replace with concerete type or define a new interface. The anternative approach would have been to use type alaises. However, this does not provide a benefit over direct replacement, because the migration is more complicated, harder to execute, needs to be done to the same code points, and results in runtime failures (whereas this approach can be complie-time checked).
- Loading branch information
Showing
4 changed files
with
58 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters