proud-jackal-16497
04/30/2021, 6:40 PM--changed-since
flag in v1.30 when using a custom targethundreds-father-404
04/30/2021, 6:44 PMclass CustomTarget(Target):
alias = "my_tgt"
core_fields = (Sources, ...)
proud-jackal-16497
04/30/2021, 6:45 PMclass GoTarget(PackTarget):
"""
Target to generate a Go based buildpack
"""
alias = "go_pack"
core_fields = (*COMMON_TARGET_FIELDS, Dependencies, Sources)
hundreds-father-404
04/30/2021, 6:47 PMSources
from pants.engine.target
? That was my first suspicion if you had been using a custom field rather than the predefined one
What is PackTarget
here?proud-jackal-16497
04/30/2021, 6:47 PMclass PackTarget(Target):
pass
hundreds-father-404
04/30/2021, 6:49 PM./pants filedeps2 path/to:tgt
show?./pants --changed-since=HEAD list
to test how --changed-since
is behaving.)proud-jackal-16497
04/30/2021, 6:51 PMhundreds-father-404
04/30/2021, 6:52 PMsources
value for v1 but not for v2? Or you are setting sources=
in the BUILD file explicitlyproud-jackal-16497
04/30/2021, 6:52 PMhundreds-father-404
04/30/2021, 6:52 PM./pants filedeps path/to:tgt
show? Note that's the v1 implementation of filedeps
proud-jackal-16497
04/30/2021, 6:53 PMgo_pack()
hundreds-father-404
04/30/2021, 6:54 PMpants.engine.target.Sources
has a default of ()
(i.e. no default)
Instead, do this
class GoPackSources(Sources):
default = ("*.go", "foo.my_ext", "!ignore_me.ext")
There will prob be some unfortunate duplication between v1 and v2 bindings - sorry for thatproud-jackal-16497
04/30/2021, 6:57 PMhundreds-father-404
04/30/2021, 6:58 PMGoPack.core_fields
to use it instead of Sources
Then run ./pants filedeps2
to make sure it works how you wantproud-jackal-16497
04/30/2021, 6:59 PM