calm-ambulance-65371
10/08/2020, 9:37 PM16:33:47.09 [ERROR] 1 Exception encountered:
Engine traceback:
in select
in pants.core.goals.test.run_tests
in pants.core.goals.test.enrich_test_result (a/b/c/test_c.py:tests)
in pants.backend.python.goals.pytest_runner.run_python_test (a/b/c/test_c.py:tests)
in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
in pants.backend.python.util_rules.python_sources.prepare_python_sources
in pants.core.util_rules.source_files.determine_source_files
Traceback (most recent call last):
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/engine/internals/native.py", line 69, in generator_send
res = func.send(arg)
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/core/util_rules/source_files.py", line 74, in determine_source_files
hydrated_sources.snapshot.digest for hydrated_sources in all_hydrated_sources
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/core/util_rules/source_files.py", line 74, in <genexpr>
hydrated_sources.snapshot.digest for hydrated_sources in all_hydrated_sources
AttributeError: 'Digest' object has no attribute 'digest'
Traceback (most recent call last):
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 281, in run
engine_result = self._run_v2()
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 193, in _run_v2
return self._maybe_run_v2_body(goals, poll=False)
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/bin/local_pants_runner.py", line 215, in _maybe_run_v2_body
poll_delay=(0.1 if poll else None),
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/init/engine_initializer.py", line 126, in run_goal_rules
goal_product, params, poll=poll, poll_delay=poll_delay
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/engine/internals/scheduler.py", line 570, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/engine/internals/scheduler.py", line 534, in _raise_on_error
wrapped_exceptions=tuple(t.exc for t in throws),
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:
Engine traceback:
in select
in pants.core.goals.test.run_tests
in pants.core.goals.test.enrich_test_result (a/b/c/test_c.py:tests)
in pants.backend.python.goals.pytest_runner.run_python_test (a/b/c/test_c.py:tests)
in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
in pants.backend.python.util_rules.python_sources.prepare_python_sources
in pants.core.util_rules.source_files.determine_source_files
Traceback (most recent call last):
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/engine/internals/native.py", line 69, in generator_send
res = func.send(arg)
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/core/util_rules/source_files.py", line 74, in determine_source_files
hydrated_sources.snapshot.digest for hydrated_sources in all_hydrated_sources
File "/home/noah/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0b3_py36/lib/python3.6/site-packages/pants/core/util_rules/source_files.py", line 74, in <genexpr>
hydrated_sources.snapshot.digest for hydrated_sources in all_hydrated_sources
AttributeError: 'Digest' object has no attribute 'digest'
hundreds-father-404
10/08/2020, 9:40 PM.digest
called on it is already a Digest
object, whereas the code probably assumes it’s a Snapshot
.
If you can update your gist, I can take a look if anything looks fishy.
(MyPy is also helpful for this, although I don’t think that MyPy is yet “taught” how to use Pants’s type hints when you’re using Pants as a third-party library. We need to do PEP 561)calm-ambulance-65371
10/08/2020, 9:42 PMcalm-ambulance-65371
10/08/2020, 9:42 PMhundreds-father-404
10/08/2020, 9:44 PMSnapshot
, rather than Digest
. That’s where it’s breaking.
Rather than await Get(Digest, AddPrefix)
, use await Get(Snapshot, AddPrefix)
. The engine will “enrich” the digest into a snapshotcalm-ambulance-65371
10/08/2020, 9:45 PMcalm-ambulance-65371
10/08/2020, 9:46 PM