Skip to content

Conversation

@mgred
Copy link
Contributor

@mgred mgred commented Sep 9, 2025

The dependencies set in the deps are not loaded in py_pytest_main.bzl.

This enables downstream targets to properly depend on @aspect_rules_py//py:defs

Otherwise we're running into an error:

ERROR: error loading package '@@rules_python+//docs': Unable to find package for @@[unknown repo 'dev_pip' requested from @@rules_python+]//:requirements.bzl: The repository '@@[unknown repo 'dev_pip' requested from @@rules_python+]' could not be resolved: No repository visible as '@dev_pip' from repository '@@rules_python+'.
ERROR: /private/var/tmp/_bazel_user/7870d530ca6897c426c1d0f00687a4c1/external/aspect_rules_py+/py/private/BUILD.bazel:62:12: error loading package '@@rules_python+//docs': Unable to find package for @@[unknown repo 'dev_pip' requested from @@rules_python+]//:requirements.bzl: The repository '@@[unknown repo 'dev_pip' requested from @@rules_python+]' could not be resolved: No repository visible as '@dev_pip' from repository '@@rules_python+'. and referenced by '@@aspect_rules_py+//py/private:py_pytest_main'

Test plan

  • Covered by existing test cases
  • New test cases added
  • Manual testing; please provide instructions so we can reproduce:
bzl_library(
    name = "foo",
    srcs = ["foo.bzl"],
    deps = [
       "@aspect_rules_py//py:defs",
   ],
)

This enables downstream targets to properly depend on `@aspect_rules_py//py:defs`
@aspect-workflows
Copy link

aspect-workflows bot commented Sep 9, 2025

Test

All tests were cache hits

45 tests (100.0%) were fully cached saving 1m 49s.

@arrdem arrdem self-assigned this Sep 9, 2025
@arrdem arrdem changed the title fix(py): set proper deps for py_pytest_main fix(pytest): Correct starlark deps for Sep 9, 2025
@arrdem arrdem changed the title fix(pytest): Correct starlark deps for fix(pytest): Correct starlark deps Sep 9, 2025
@arrdem arrdem merged commit 30d82dc into aspect-build:main Sep 9, 2025
16 checks passed
@arrdem
Copy link
Collaborator

arrdem commented Sep 9, 2025

Thanks!

@mgred mgred deleted the fix-bzl-lib branch September 9, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants