<@U06A03HV1> <@U6YPB4SJX> any idea why a sources s...
# development
a
@witty-crayon-22786 @average-vr-56795 any idea why a sources snapshot would return the empty digest on a target i've created with
self.add_to_build_file()
in a
ConsoleRuleTestBase
? i'm going to have to table working on this for now, but the
@console_rule
itself works, and the testing should too, i just haven't had time to dive into how to get my file contents into the sources snapshot. https://github.com/pantsbuild/pants/pull/7419
a
Can you point me at a call to
.target
that’s the one that’s failing in that PR?
a
the command line i posted with the
-k
will drop you into a pdb prompt which should show a mock target successfully created and accessible within a rule, but the sources snapshot is the empty digest
a
Aha, there’s a comment on the PR!
a
yes!
oh darn i meant to link to that
thank you
(i didn't mention the pdb prompt on the PR though oops)
a
My guess is it’s because you’re using
create_workdir_file
to make the thrift file, where you want to be using
create_file
Because
workdir
means “directory where pants stores some stuff” not “working directory”
a
hmmmmm
this is
quite reasonable
won't be working on that today but it gives me an easy thing to come back to tonight