mesonbuild/meson

error when program is not found is not useful

Open

#2.029 geöffnet am 3. Juli 2017

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (1.465 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (4.978 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 139T 13h) (51 gemergte PRs in 30 T)

Beschreibung

I have a tags target:

run_target('tags', command : ['etags', '-o', '@0@/@1@'.format(meson.source_root(), 'TAGS')] + all_files)

(The presence of etags is not checked first with find_program on purpose: I want the target to be always there, and just fail with an error message is the program is not found. And I don't want to spam normal builds with a message about a missing etags program, because most users won't need it.)

When this target is executed and ctags is not installed, the message is useless:

$ ninja -C build ctags
[0/1] Running external command ctags.
Could not execute command "ctags".
FAILED: ctags 
'/usr/bin/python3' '/home/zbyszek/src/meson/meson.py' '--internal' 'commandrunner' '/home/zbyszek/src/casync' '/home/zbyszek/src/casync/build' '' '/home/zbyszek/src/meson/mesonintrospect.py' 'ctags' '-o' '/home/zbyszek/src/casync/tags' ...
ninja: build stopped: subcommand failed.

I'd expect the usual:

meson: ‘ctags’: No such file or directory

Contributor Guide