Commit Graph

18 Commits

Author SHA1 Message Date
Isabella Muerte 91c1cc6f9e Add VT100 ANSI escape sequences for Windows 10.
This change still relies on the older 'ANSICON' environment check as a
fallback, in the event we're on "not Windows 10". (Calling
`SetConsoleMode` with unsupported values results in a 0 being returned)
2018-05-01 20:17:14 +03:00
Xavier Claessens 10a9bdad96 interpreter: Verify permitted kwargs on all methods 2018-04-26 00:01:48 +03:00
Jon Turney cb597adb01 Indicate subproject depth in console output 2018-04-13 01:05:54 +00:00
Jukka Laurila 52c50da6c7 Refactor: Add log.error and log.exception to reduce code duplication. 2018-03-10 18:04:52 +02:00
Jon Turney 845dbfcbbc Handle a warning location which evaluates to False
As written in PR #2856, this code isn't quite right.

An ArgumentNode object can evaluate as False (if it's arguments attribute is
an empty sequence).

If that happens, we then try to hand the location kwarg down to print(),
rather than removing it, which causes an invalid keyword argument exception.

This failure can be seen e.g. when generating for gnome-twitch (See [1])

[1] https://travis-ci.org/jon-turney/meson-corpus-test/jobs/343017109
2018-02-21 19:10:56 +02:00
Jon Turney 6a1a56ab57 Report warning/error locations in a format IDEs may already know how to parse
Examples:

meson.build:2:0: ERROR: Dependency is both required and not-found
meson.build:4: WARNING: Keyword argument "link_with" defined multiple times.

These are already matched by the default compilation-error-regexp-alist in
emacs.

Also:
Don't start 'red' markup until after the \n before an error
Unabsorb full-stop at end of warning with location from mlog.warning()
Update warning_location test
2018-01-30 06:48:22 +11:00
Jon Turney 2ed875e1b4 Consolidate warning location formatting in mlog.warning()
Also use .format() rather than %
Also use build.environment rather than hardcoding 'meson.build'
2018-01-01 13:20:55 +00:00
Joergen Ibsen 1db319737d Enable ANSI colors on Windows when ANSICON is set
This enables colors with ConEmu.
2017-11-29 23:53:58 +02:00
Nirbheek Chauhan f04d141088 logging: Print location of log file on error
Similar to configure

Closes https://github.com/mesonbuild/meson/issues/2316
2017-09-14 18:29:30 +03:00
Jussi Pakkanen c2a5ac3981 Ensure log file gets closed. 2017-08-18 12:08:50 +03:00
Aaron Small 76c8491d77 Add an option to dependencies called 'method'. This can be used to
configure a detection method, for those types of dependencies that have
more than one means of detection.

The default detection methods are unchanged if 'method' is not
specified, and all dependencies support the method 'auto', which is the
same as not specifying a method.

The dependencies which do support multiple detection methods
additionally support other values, depending on the dependency.
2017-04-09 03:31:39 -04:00
Michal Sojka 1713aef364 Do not colorize output on dumb terminals
Dumb terminal is provided e.g. by Emacs for programs run within it.
2017-03-08 06:37:42 -05:00
Jussi Pakkanen a7609e76f6 Graceful fallback when printing messages with characters not understood by stdout. 2017-03-01 07:58:46 -05:00
Jussi Pakkanen a61e41b1d2 Force log file to UTF-8. 2017-02-27 07:33:23 -05:00
Mike Sinkovsky 969be1f679 cleanup: Remove redundant parentheses 2017-01-18 21:22:47 +02:00
Nirbheek Chauhan a2262103fb Implement mlog.warning and use it everywhere for warnings
Prepends the string with 'WARNING:' in ANSI yellow.

Closes https://github.com/mesonbuild/meson/issues/961
2016-11-08 17:43:24 -05:00
Jussi Pakkanen 436eab9b85 Print full mesonlog on failed tests when run under CI. 2016-06-23 00:03:59 +03:00
Jussi Pakkanen 23b98cd6e6 Renamed meson package to mesonbuild so that we can have a script named meson in the same toplevel dir. 2016-01-16 17:35:29 +02:00