Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hatch fails with IndexError when testing with specific Python #1454

Open
stumpylog opened this issue May 2, 2024 · 2 comments
Open

Hatch fails with IndexError when testing with specific Python #1454

stumpylog opened this issue May 2, 2024 · 2 comments

Comments

@stumpylog
Copy link

Given the configuration below, running in Github Actions with actions/setup-python@v5 to setup the specific version in a parallel action matrix, hatch will fail with an IndexError when run with a command such as hatch test --cover --python pypy3.8

...
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "pypy3.8", "pypy3.9", "pypy3.10"]
...

I think this is two issues:

  1. hatch probably shouldn't crash if the Python version given doesn't match somethin (I'm a little unsure what that something is)
  2. hatch seems to be unable to find the version of PyPy the action sets up, based on hatch python show: https://github.com/stumpylog/tika-client/actions/runs/8927847240/job/24522134685#step:6:1

Example log: https://github.com/stumpylog/tika-client/actions/runs/8927847240/job/24522134685#step:8:1
Hatch Version: 1.10.0

@ofek
Copy link
Sponsor Collaborator

ofek commented May 2, 2024

I will fix that error but the test command acts upon the environment hatch-test. Can you please try modifying that environment instead? https://hatch.pypa.io/latest/config/internal/testing/#matrix

@stumpylog
Copy link
Author

I see, the default matrix isn't shared as I imagined. Updating that one does resolve everything. Thanks!

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

No branches or pull requests

2 participants