Page MenuHomePhabricator

Make Field a class

Authored by max on Nov 2 2019, 12:05 AM.


Group Reviewers
Restricted Project
R1:b2b6329688e6: Make Field a class
Test Plan


Diff Detail

R1 dagster
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

max created this revision.Nov 2 2019, 12:05 AM
schrockn requested changes to this revision.Nov 2 2019, 12:19 AM

Couple things:

  1. What's the rationale for this?
  2. If we do this would rather not do inheritance.
This revision now requires changes to proceed.Nov 2 2019, 12:19 AM
max added a comment.Nov 2 2019, 12:30 AM

Superficially, this fixes issues with the autodoc machinery, which won't link Field in function signatures since this is not a class. The deeper problem is that FieldImpl should not be public, but that is in fact the type we expect all over the place -- this solves for that leakage of internals.

max added a comment.Nov 2 2019, 12:32 AM

I'm also fine collapsing Field and FieldImpl and moving all this logic to Field.__init__.

max added a comment.Nov 4 2019, 4:54 PM

Collapsing Field and FieldImpl leads to very difficult circular import issues, which I suspect are why we distinguished them in the first place.

max updated this revision to Diff 6184.Nov 4 2019, 6:20 PM

Collapse Field and FieldImpl

alangenfeld accepted this revision.Nov 4 2019, 6:24 PM

see you in circular import hell ๐Ÿ˜œ

This revision was not accepted when it landed; it landed in state Needs Review.Nov 4 2019, 10:08 PM
This revision was landed with ongoing or failed builds.
Closed by commit R1:b2b6329688e6: Make Field a class (authored by max). ยท Explain Why
This revision was automatically updated to reflect the committed changes.