aspect-build / aspect-build/rules_py

[Bug]: resolution-markers never resolved

Open
#994 1 comment 2 reactions 0 assignees View on GitHub
bug
Dominant language
Starlark
Stars
145
Forks
97
Avg merge
1d 1h
Merged PRs (30d)
71

Description

### What happened?

For example I'm using torch for MacOS and Linux but because for Linux I need cuda packages, on macos it's selected also because there no evaluation of package `resolution-markers` from lock file.

```[project]
name = "backend"
version = "1.0.0"
dependencies = [
"fastapi>=0.128.0",
"torch==2.9.1",
"torchvision",
"torchaudio",
]

[tool.uv.sources]
torch = [
{ index = "torch-cuda", marker = "sys_platform == 'linux'" },
{ index = "pypi", marker = "sys_platform == 'darwin'" },
]
torchaudio = [
{ index = "torch-cuda", marker = "sys_platform == 'linux'" },
{ index = "pypi", marker = "sys_platform == 'darwin'" },
]
torchvision = [
{ index = "torch-cuda", marker = "sys_platform == 'linux'" },
{ index = "pypi", marker = "sys_platform == 'darwin'" },
]

[[tool.uv.index]]
name = "torch-cuda"
url = "https://download.pytorch.org/whl/cu130"
explicit = true

[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"```

### Version

bazel 9.1.0

### How to reproduce

```shell

```

### Any other information?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the supplied pyproject configuration and investigate how resolution-markers from the lock file are evaluated for macOS and Linux. Reproduce the torch index selection issue, then trace the lock-file resolution path; done means platform-specific indexes select the correct packages instead of resolving the Linux CUDA source on macOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.