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

Warn (or error?) on unhandled options passed to `meson install`

Open WillAyd opened this issue 1 year ago • 2 comments

It appears that having:

[tool.meson-python.args]
install = ['--skip-subprojects nanoarrow']

is a no-op. To actually skip the subproject, I have to use:

[tool.meson-python.args]
install = ['--skip-subprojects=nanoarrow']

Is this distinction intentional?

WillAyd avatar Sep 24 '24 17:09 WillAyd

The correct form is either install = ['--skip-subprojects', 'nanoarrow'] or install = ['--skip-subprojects=nanoarrow']. The install = ['--skip-subprojects nanoarrow'] form passes a single --skip-subprojects nanoarrow flag, which is incorrect. I don't know why this does not result in an error though.

dnicolodi avatar Oct 06 '24 17:10 dnicolodi

meson-python allows to specify options to be passed to the different meson subcommands invoked during the build: meson setup, meson compile, meson install. However, it does not really execute meson install but performs equivalent operations. For this reason, the options that would be passed to meson install are interpreted directly by meson-python. meson-python supports the --tags and --skip-subprojects options and ignores everything else. As reported by the OP, this may cause confusion when options are misspelled or when unsupported options are specified.

Emitting an error when an unsupported option is specified may be the best thing to do. A warning should be emitted, at least.

dnicolodi avatar Oct 10 '24 10:10 dnicolodi

Fixed by #797

dnicolodi avatar Oct 27 '25 17:10 dnicolodi