Templates are not covered by any target or inference.
xlevus opened this issue · comments
Chris Targett commented
It does not appear that the templates are owned by any target.
/tmp/tmp.wRy8z5idAO/example-django ‹main›
╰─➤ ./pants list :: | grep ".html"
/tmp/tmp.wRy8z5idAO/example-django ‹main›
╰─➤ ./pants dependees helloworld/ui/templates/helloworld/ui/index.html
15:30:21.73 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/home/xlevus/.cache/pants/setup/bootstrap-Linux-x86_64/2.8.0rc0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 235, in _run_inner
return self._perform_run(goals)
File "/home/xlevus/.cache/pants/setup/bootstrap-Linux-x86_64/2.8.0rc0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 174, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/home/xlevus/.cache/pants/setup/bootstrap-Linux-x86_64/2.8.0rc0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 191, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/home/xlevus/.cache/pants/setup/bootstrap-Linux-x86_64/2.8.0rc0_py39/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 133, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/home/xlevus/.cache/pants/setup/bootstrap-Linux-x86_64/2.8.0rc0_py39/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 548, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/home/xlevus/.cache/pants/setup/bootstrap-Linux-x86_64/2.8.0rc0_py39/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 516, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
ResolveError: No owning targets could be found for the file `helloworld/ui/templates/helloworld/ui/index.html`.
Please check that there is a BUILD file in the parent directory helloworld/ui/templates/helloworld/ui with a target whose `sources` field includes the file. See https://www.pantsbuild.org/v2.8/docs/targets for more information on target definitions.
You may want to run `./pants tailor` to autogenerate your BUILD files. See https://www.pantsbuild.org/v2.8/docs/create-initial-build-files.
If you would like to ignore un-owned files, please pass `--owners-not-found-behavior=ignore`.
Use --print-stacktrace for more error details and/or -ldebug for more logs.
See https://www.pantsbuild.org/v2.8/docs/troubleshooting for common issues.
Consider reaching out for help: https://www.pantsbuild.org/v2.8/docs/getting-help
Benjy Weinberger commented
Closed in #11