-
Notifications
You must be signed in to change notification settings - Fork 322
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
Light cleanup of GenerationStrategyInterface
#2256
Conversation
This pull request was exported from Phabricator. Differential Revision: D51441575 |
Summary: Key changes: 1. bring back to GS aspects of GSI that are not needed there and are polluting the interface, 2. make `_name` a required attribute of both GSI and GS. Re: 2), having it be set during the first call to `name` property was causing weird bugs in equality checks, there two GSs looked like they were equal but they weren't at the time of the initial equality check (one had the `_name` set because its `name` prop was called, and another did not yet). They would become equal during the call to `__repr__` that occurred in reporting their inequality as an error (!), because `__repr__` would call `GS.name`, which would result in `GS._name` getting set. Weird stuff! Reviewed By: danielcohenlive, mgarrard Differential Revision: D51441575
7d4d89c
to
1290067
Compare
This pull request was exported from Phabricator. Differential Revision: D51441575 |
Summary: Key changes: 1. bring back to GS aspects of GSI that are not needed there and are polluting the interface, 2. make `_name` a required attribute of both GSI and GS. Re: 2), having it be set during the first call to `name` property was causing weird bugs in equality checks, there two GSs looked like they were equal but they weren't at the time of the initial equality check (one had the `_name` set because its `name` prop was called, and another did not yet). They would become equal during the call to `__repr__` that occurred in reporting their inequality as an error (!), because `__repr__` would call `GS.name`, which would result in `GS._name` getting set. Weird stuff! Reviewed By: danielcohenlive, mgarrard Differential Revision: D51441575
1290067
to
4c3106c
Compare
This pull request was exported from Phabricator. Differential Revision: D51441575 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2256 +/- ##
==========================================
- Coverage 94.86% 94.84% -0.02%
==========================================
Files 467 467
Lines 46478 46489 +11
==========================================
+ Hits 44090 44094 +4
- Misses 2388 2395 +7 ☔ View full report in Codecov by Sentry. |
Summary: Key changes: 1. bring back to GS aspects of GSI that are not needed there and are polluting the interface, 2. make `_name` a required attribute of both GSI and GS. Re: 2), having it be set during the first call to `name` property was causing weird bugs in equality checks, there two GSs looked like they were equal but they weren't at the time of the initial equality check (one had the `_name` set because its `name` prop was called, and another did not yet). They would become equal during the call to `__repr__` that occurred in reporting their inequality as an error (!), because `__repr__` would call `GS.name`, which would result in `GS._name` getting set. Weird stuff! Reviewed By: danielcohenlive, mgarrard Differential Revision: D51441575
This pull request has been merged in c7dadf4. |
Summary:
Key changes:
_name
a required attribute of both GSI and GS.Re: 2), having it be set during the first call to
name
property was causing weird bugs in equality checks, there two GSs looked like they were equal but they weren't at the time of the initial equality check (one had the_name
set because itsname
prop was called, and another did not yet). They would become equal during the call to__repr__
that occurred in reporting their inequality as an error (!), because__repr__
would callGS.name
, which would result inGS._name
getting set. Weird stuff!Reviewed By: danielcohenlive, mgarrard
Differential Revision: D51441575