This commit moves Skeema from tracking dependencies using Dep to now using
Golang's newer module support.
The version of Golang used in CI is now updated to v1.12.
This commit also updates the version of several third-party dependencies.
This commit adds a new field to the fs.Dir struct, ParseError, for storing
any error that occurred while parsing the directory. This then allows
Dir.Subdirs() to return all subdirs -- even ones with parse errors --
permitting the callsite to decide what to do about subdirs that had problems.
Previously, callsites had no exposure to what was wrong with a subdir,
limiting the ability to provide informative logging.
This commit also includes related logging improvements to various Subdirs()
callsites, and reduction in gocyclo complexity for several overly-large
recursive subdirectory-walking functions.
This commit aims to improve the readability of Skeema's output by using
word-wrapping and indentation in two places:
* STDERR log messages
* Option descriptions on --help screens
This logic is only applied if the relevant output device is a TTY, rather than
a normal file.
This PR moves much of Skeema's logic out of the main package and into several
new sub-packages, which can be imported by other applications if desired.
Functionality is largely unchanged, and no new features have been added. But a
few foundational benefits of this work include:
* The codebase no longer assumes a 1:1 mapping between *.sql files and tables.
This will eventually permit non-table object types (views, procs, grants, etc)
to be stored in the same repo as schemas, if desired. See #41 for background.
* In the upcoming Skeema 1.1.x series, it will be possible to use a local Docker
instance for temp schema operations. This performs better in high-latency,
high-table-count scenarios; see #25 for background.
* The limit on max *.sql file size has been removed. Closes#34.
* `skeema pull` now performs much better than before, as long as --normalize is
enabled (which it is by default).
* The code supporting `skeema push --concurrent-instances` is now much cleaner
and more idiomatic.
* Test coverage has been improved.
Update vendored version of skeema/tengo to latest (incl cleaner return val for
unsupported DDL), and improve output/logging/exitcode for unsupported DDL.
Improve output/logging for errors and skipped operations.
Add global --debug option. So far only used in logging exit codes, but more
debug output will be added soon.