`hatch build` fails with no indication as to why
Running hatch build crashes with status code 103, but there's no output indicating what the problem is and I also can't find any documentation about what exit code 103 means.
Aran-Fey@desktop-1bkul1e /d/U/A/D/f/c/p/rio (main)> py -m hatch --verbose build -t wheel
──────────────────────────────────────────── wheel ────────────────────────────────────────────
Aran-Fey@desktop-1bkul1e /d/U/A/D/f/c/p/rio (main) [103]>
How on earth am I supposed to debug this??
Can you provide more information, what OS are you running from? Do you see the same when running hatch from the binary rather than as a python module? Can you try running py -m hatch -vvv build and providing the output from that
I'm on Windows 11. Using the binary makes no difference. -vvv also doesn't make a difference.
That said, I can successfully build a wheel via uv build.
Also, to be clear, I'm not asking for help debugging my specific issue. I'm asking for more useful stderr output and/or documentation about exit codes.
The goal is not to help you debug but to get some form of minimal reproducible example from which to start to determine why there is not enough output in stderr, as I cannot reproduce this locally. I get the correct outputs and level of verbosity.
I had the same issue with a project set up to use "hatch build -t pyinstaller" that suddenly stopped working
(.venv) λ hatch build -t pyinstaller ───────────────────────────────────────────────────────────────────────── pyinstaller ──────────────────────────────────────────────────────────────────────────
and then nothing. After debugging for the afternoon, I discovered the problem was a '-' in the [project] of pyproject.toml
[project] name = "My-App" <<< this breaks the build
Updating to a name without a "-" makes the build work again. [project] name = "MyApp"
How is there any exit w/o an error!?
There is indeed a "-" character in my project's name as well. Can't wait to find out why that causes an issue.
Does your package root folder name also contain a hyphen?
Yes
I'm asking for more useful stderr output and/or documentation about exit codes.
💯
I've encountered this situation many times in various scenarios (not exclusive to hatch build). Whatever I asked hatch to do, when it exits with non-zero exit code then -vvv did not provide any extra output whatsoever. If you are lucky then the problem produces a traceback, like with the click situation few weeks ago but that is rare.