bitter-ability-32190
10/18/2022, 3:13 PMI don't see the synthetic targets affecting this scenario at all as it stands today. It could potentially evolve in that direction somehow, let's have a thread in Slack about that.From https://github.com/pantsbuild/pants/discussions/17253 🧵
bitter-ability-32190
10/18/2022, 3:15 PMSynthetic targets are overridable. If you declare a target with the same address (and target type) as a synthetic target in a BUILD file it replaces the synthetic target, unless theTheoretically, could we not havetarget field value is true in which case only the field values provided in the BUILD file are overridden._extend_synthetic
python_sources
generate synthetic targets (does it now?). The user then has:
python_sources(sources=["**/*.py", ...])
in the root.
Then in projectA/subdirX/BUILD
they define:
python_source(
name="IDK whatever it needs to be",
source="myfile.py"
dependencies=["./myresource.json"]
_extend_synthetic=True
)
As a way to augment the generated python_source
with the new dependency (in this case ADDING the dep to the list defined way above)bitter-ability-32190
10/18/2022, 3:16 PMname
and _extend_synthetic
). Perhaps _extend_synthetic
becomes a new target type per target type: e.g. extend_python_source
, extend_shell_source
, ...curved-television-6568
10/18/2022, 3:45 PMbitter-ability-32190
10/18/2022, 3:45 PMcurved-television-6568
10/18/2022, 3:45 PMcurved-television-6568
10/18/2022, 3:46 PM