https://pantsbuild.org/ logo
#development
Title
# development
h

hundreds-father-404

10/28/2021, 1:13 AM
To try to clarify, I'm proposing this modeling:
Copy code
class DockerSourceField(SingleSourceField):
   default = "Dockerfile"

class SyntheticDockerSourceField(DockerSourceField):
  default = None
   expected_num_files = 0
   alias = "_source"
Then your rules use
tgt.get(DockerSourceField)
and are agnostic to knowing
SyntheticDockerSourceField
exists, beyond needing to set
enable_codegen=True
when you're hydrating sources