Commit Graph

36 Commits

Author SHA1 Message Date
Daniel Mensinger e39d570d3a
mlog: add non bold version of colors 2019-11-14 17:05:18 +01:00
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
Niklas Claesson b8fbbf5964 Make parser errors print relative path to meson.build file 2019-10-10 00:40:30 +03:00
Michael Hirsch, Ph.D cb7d236696 pythonic file checks 2019-07-11 22:37:25 +03:00
Daniel Mensinger 2b5831f94f
Fix flake8-bugbear warnings 2019-04-29 12:22:50 +02:00
Daniel Mensinger e75211d321
Fix builtin variable names 2019-04-29 12:17:40 +02:00
Dylan Baker 891136178d mlog: add type annotations 2019-04-22 13:49:50 -07:00
Daniel Mensinger 5d2f14fce7
rewriter: Quiet logging by default 2019-03-04 13:00:30 +01:00
Xavier Claessens 815f1205a8 do_subproject: Improve log messages and formatting 2019-01-16 11:16:46 -05:00
Daniel Mensinger c033af914a
Disable mlog and don't require build directory for environment 2018-12-29 23:55:45 +01:00
Xavier Claessens 60b58e056f Add 'meson subprojects update' command
This is inspired by gst-build's git-update script.
2018-12-02 08:37:32 -05:00
Nirbheek Chauhan a52cd31a6c Print dependencies being used for compiler checks
It is a common idiom to look for a function or a specific type or
a header in various locations/libraries, and it can be confusing to
see the (seemingly) identical compiler check being done multiple
times.

Now we print the dependencies being used when a compiler check is run

Before:
Checking for function "fbGetDisplay": NO
Checking for type "GLeglImageOES": YES
Checking for function "asinh": YES

After:
Checking for function "fbGetDisplay" with dependency egl: NO
Checking for type "GLeglImageOES" with dependencies glesv2, gl: YES
Checking for function "asinh" with dependency -lm: YES
2018-10-29 21:44:46 +02:00
Xavier Claessens ef231d3edd Add --fatal-meson-warnings command line option
This makes any warning message printed by meson raise an exception,
intended to be used by CI and developpers to easily catch deprecation
warnings and other potential issues.
2018-09-04 09:01:39 -04:00
Xavier Claessens bef8187e43 mlog.shutdown(): Return the log file path or None if not initialized 2018-08-22 15:15:54 -04:00
Nirbheek Chauhan 2093d45a4e Print a more usable message when a subproject fails to configure
Instead of just printing the message in the exception, if it's
a MesonException, also print the file and the line number. If it's an
unknown exception, print the entire traceback so that we can pin-point
what the Meson bug causing it is.
2018-07-07 04:33:24 -07:00
Nirbheek Chauhan 4fb00ee1d8 Add new method: mlog.deprecation()
Instead of constructing it manually, use a helper.
2018-07-07 04:33:24 -07:00
Nirbheek Chauhan e4417eb301 mlog: Log timestamps in profile-self mode
This makes it much clearer which statements are taking a long time,
and helps in interpreting the outputted profile itself.
2018-07-06 06:25:12 +00:00
Nirbheek Chauhan 1415cd2d07 mlog: Add built-in support for quoting bolded messages
This allows us to drop wonky sep='' hacks and manual addition of
spaces across the codebase.
2018-07-06 06:25:12 +00:00
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