Check what the default encoding for the system is set to. If this is not
configured to use 'UTF-8', log a warning to the user as this is known
to cause issues when attempting to parse none ascii files during operation.
To ensure that a compatible version of devlib is installed on the system
keep track of the version of devlib that is required by WA and provide a
more useful error message if this is not satisfied.
- Add copyright headers to files that did not already have them
- Update the year to the last year the file was modified in files with
existing headers.
Python 3 has changed the behavior of subparsers so that they are no
longer mandatory by default. As a result, executing just "wa" under
Python 3 results in a random error, rather than a help message.
Fix this by making the subparsers mandatory.
In a previous commit we filtered parameters so that '-h' is never passed
to 'parse_known_commands' to ensure our own custom help message is displayed,
now also filter for '--help' for the same reason.
Move the logging of the WA version and command line used to invoke it
from run command into main() inside entrypoint. That way, these will be
the first entries in the log file, now that early log records are no
longer lost.
Upon initilisation WA3 will now also check if a WA3 config file
exisits, rather than just the exsistance of the config directory.
If a `config.yaml` file is not found WA will look for a WA2 config.py
file and convert it to the new format, otherwise a default config file
will be generated.
- Keep track of logged exceptions inside log_error itself.
- signal: log the exception, if there is one in the finally clause of
the signal wrapper; this will ensure that the error will be logged
closer to the command that originated.
- entrypoint: use log.log_error for top-level error logging, rather than
the entrypoint logger directly; this will ensure that errors are not
repeated unnecessarily.
- Log CTRL-C message at zeroth indent level to make it easier to see in
the non-verbose output where it occurred.
Previously only the top level help message would ever be displayed,
this was caused by 'parse_known_commands' automatically displaying the
default help message and exiting before any of the custom plugins are
loaded. Now ensure this flag is never passed into the method.
In order to properly enable verbose logging for plugin enumeration,
verbosity option must be extracted before commands are processed, and
therefore before all valid arguments are known.
ArgumentParser.parse_known_args() is used for this, which will collect
all unexpected arguments into an "extras" list, rather than raising an
error. This, however, has an outstanding bug, where if say option '-v'
is known and '-f is unknown, args '-v -f' will be parsed correctly (with
'-f' being collected into extras), but '-vf' will not, resulting in an
error.
To get around this, pre-process sys.argv to detect joined options and
manually split them into separate args.
Changing the way target descriptions work from a static mapping to
something that is dynamically generated and is extensible via plugins.
Also moving core target implementation stuff under "framework".