From 0dd05aac8d6fb51fffb8bd3c7c58af62fa9fcd34 Mon Sep 17 00:00:00 2001 From: Mike Bland Date: Thu, 15 Dec 2016 11:45:34 -0500 Subject: [PATCH] go-script-bash v1.2.1 --- README.md | 4 ++-- RELEASE.md | 34 +++++++++++++++++++++++----------- go-core.bash | 2 +- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 55fc108..033bc3e 100644 --- a/README.md +++ b/README.md @@ -195,8 +195,8 @@ scripts can be in any other interpreted language.__ First you'll need a copy of this framework available in your project sources. Archives are available at: -- https://github.com/mbland/go-script-bash/archive/v1.2.0.tar.gz -- https://github.com/mbland/go-script-bash/archive/v1.2.0.zip +- https://github.com/mbland/go-script-bash/archive/v1.2.1.tar.gz +- https://github.com/mbland/go-script-bash/archive/v1.2.1.zip You can also add this repository to your project as a [`Git submodule`](https://git-scm.com/book/en/v2/Git-Tools-Submodules): diff --git a/RELEASE.md b/RELEASE.md index 4a25aa7..738c8f7 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,6 @@ -# go-script-bash v1.2.0 +# go-script-bash v1.2.1 -This release adds a stack trace feature to the public API. +This release enhances the public stack trace feature and adds it to `@go.log FATAL` output. ## The `./go` script: a unified development environment interface @@ -16,19 +16,31 @@ This software is made available as [Open Source software](https://opensource.org ## What's new in this release -### Print stack traces +### Make `@go.print_stack_trace` take a numerical `skip_callers` argument -The `@go.print_stack_trace` function is now part of the public API. Its original use case was to provide more helpful error messages from `. "$_GO_USE_MODULES"`, but it's generally useful. See the function comments in `go-core.bash` and `./go test --edit core/print-stack-trace` for more information. +Previously `@go.print_stack_trace` would only skip the immediate caller if the first argument was not null. Now it enforces that the number be a positive integer, in order to skip over the specified number of callers while printing the stack trace. This was done to support better `@go.log FATAL` output, described below. -## Changes since v1.1.2 +Normally an API change like this would warrant a major version bump, but since the impact should be minimal, it any potential for impact exists at all, it's included in this patch release. + +### Include stack trace output on `@go.log FATAL` conditions + +`@go.log FATAL` now prints a stack trace before exiting the process, since such information is generally useful under `FATAL` conditions. Every function in the `log` module that calls `@go.log FATAL` removes itself from the stack trace, so the top of the stack shows the location of the user code that triggered the condition, rather than the location of the `log` module function. + +## Changes since v1.2.0
-fb6f3ae Mike Bland 
-        Merge pull request #27 from mbland/stack-trace
+b2ad688 Mike Bland 
+        Merge pull request #28 from mbland/stack-trace
+
+965782d Mike Bland 
+        log: Add stack trace to FATAL output
+
+a0f4413 Mike Bland 
+        stack-trace: Move, add helpers to environment.bash
 
-30790c9 Mike Bland 
-        use: Show stack trace when an import fails
+cd57da0 Mike Bland 
+        print-stack-trace: Add go-core stack test helper
 
-8563f4d Mike Bland 
-        core: Add @go.print_stack_trace to public API
+8424338 Mike Bland 
+        print_stack_trace: Make skip_callers arg numerical
 
diff --git a/go-core.bash b/go-core.bash index 821940c..3a83e1e 100755 --- a/go-core.bash +++ b/go-core.bash @@ -39,7 +39,7 @@ fi # This and other variables are exported, so that command scripts written in # languages other than Bash (and hence run in new processes) can access them. # See `./go vars` and `./go help vars`. -declare -r -x _GO_CORE_VERSION='v1.2.0' +declare -r -x _GO_CORE_VERSION='v1.2.1' # The URL of the framework's original source repository declare -r -x _GO_CORE_URL='https://github.com/mbland/go-script-bash'