aspect-build / aspect-cli

correct, fast, usable: choose three
https://aspect.build/cli
Apache License 2.0
84 stars 19 forks source link

[Bug]: `configure` descends into virtual env #715

Open alexeagle opened 2 months ago

alexeagle commented 2 months ago

What happened?

Updating BUILD files for python 2024/06/16 09:53:22 ERROR: failed to validate dependencies for target "//app": "_pytest._py.error" at line 6 from "app/.app_test.venv/lib/python3.12/site-packages/py.py" is an invalid dependency: possible solutions:

  1. Add it as a dependency in the requirements.txt file.
  2. Instruct Gazelle to resolve to a known dependency using the gazelle:resolve directive.
  3. Ignore it with a comment '# gazelle:ignore _pytest._py.error' in the Python file.

Version

HEAD

How to reproduce

No response

Any other information?

I know I can .bazelignore that folder, but that's frustrating because users are going to sprinkle these all over the place and will be impossible to update .bazelignore all the time.

Maybe this should be filed against rules_python, @jbedard WDYT?

jbedard commented 1 month ago

I don't know enough about these files in python to say, but I assume it either needs to be .bazelignored or the rules_python gazelle extension needs to handle this. Or I guess manually doing # gazelle:ignore on each one might work.