proud-dentist-22844
04/28/2023, 6:08 PMpackage
goal to package 4 distinct target types. To do this, I need to implement a PackageFieldSet
. Essentially, I need all the fields on the target, which means I need a FieldSet
that lists all of the fields on the target. I'm debating between making a FieldSet
for each target that lists everything, or creating a single FieldSet
that lists the few fields that are common between the 4 distinct target types. But, I'm not sure what the value of having a FieldSet
is.
From the docs:
Ais a way to specify which Fields your rule needs to use in a typed way that is understood by the engine.FieldSet
Normally, your rule should simply usehttps://www.pantsbuild.org/v2.17/docs/rules-api-and-target-api#fieldsets What is the value of listing all of the fields in theandtgt.get()
instead of atgt.has_field()
. However, for several of the Common plugin tasks, you will instead need to create aFieldSet
so that the combination of fields you use can be represented by a type understood by the engine.FieldSet
FieldSet
?
Could I list a bare minimum set in the FieldSet
, get the original target, and then access the fields on the original target?
Why does the engine need the types on the FieldSet
for packaging? Something to do with caching?enough-analyst-54434
04/28/2023, 6:21 PMenough-analyst-54434
04/28/2023, 6:23 PMenough-analyst-54434
04/28/2023, 6:24 PMproud-dentist-22844
04/28/2023, 6:29 PM