meson-python icon indicating copy to clipboard operation
meson-python copied to clipboard

ENH: raise SystemExit when calling meson fails

Open dnicolodi opened this issue 3 years ago • 1 comments

Fixes #228.

dnicolodi avatar Nov 24 '22 19:11 dnicolodi

This fixes the case when Meson errors out. However, the new configuration handling code raises ConfigurationError exceptions that are not handled gracefully. Maybe the pep517 hooks should be wrapped in something that turns these into nicer error messages. I don't know what is the recommended pep517 way of doing this, though.

dnicolodi avatar Nov 24 '22 19:11 dnicolodi

What is the status of this PR? People are reporting the failures directly to Meson itself now.

As far as I can tell, this flawlessly solves the problem some of the time, and doesn't touch the code involved in some other times. It seems obviously correct (incremental improvements FTW) and solves real problems for people, so why delay in merging it?

eli-schwartz avatar Dec 21 '22 19:12 eli-schwartz

What is the status of this PR? People are reporting the failures directly to Meson itself now.

I am almost finished in #87, after that is in, I will merge this too and make a release.

FFY00 avatar Dec 21 '22 19:12 FFY00

On user input error (either command line or configuration file) we now raise ConfigError and nothing catches that. I wanted to fix that too before merging. But this can come at a later time.

dnicolodi avatar Dec 21 '22 20:12 dnicolodi

I am almost finished in https://github.com/mesonbuild/meson-python/pull/87, after that is in, I will merge this too and make a release.

@FFY00 I recommend leaving enough time pre and post merge of that PR, so we're sure it's in good shape when it is released. This PR doesn't have to wait for that one.

rgommers avatar Dec 21 '22 20:12 rgommers

I added handling of the exceptions raised for configuration errors. Please have a look.

dnicolodi avatar Dec 21 '22 22:12 dnicolodi

@FFY00 I recommend leaving enough time pre and post merge of that PR, so we're sure it's in good shape when it is released. This PR doesn't have to wait for that one.

Yeah, it makes sense to release this first :+1:

FFY00 avatar Dec 22 '22 13:12 FFY00