Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0 bug fixes #20

Closed
5 of 6 tasks
jasonkarns opened this issue Oct 2, 2017 · 9 comments
Closed
5 of 6 tasks

1.0 bug fixes #20

jasonkarns opened this issue Oct 2, 2017 · 9 comments

Comments

@jasonkarns
Copy link
Member

jasonkarns commented Oct 2, 2017

@mbland
Copy link
Contributor

mbland commented Oct 3, 2017

Corresponding to each of the above:

@mbland mbland mentioned this issue Oct 3, 2017
@mbland
Copy link
Contributor

mbland commented Oct 3, 2017

Update on the Alpine/Busybox business: Per #16, the failures I saw were due to ncurses not being installed and tput being missing, not due to any further Busybox compatibility issues.

@mbland
Copy link
Contributor

mbland commented Oct 7, 2017

Just opened #23 to address the bats-preprocess tabs issue.

mbland added a commit that referenced this issue Oct 7, 2017
Part of #20. Addresses sstephenson/bats#171.

Bats is now capable of executing test cases that conform to the
"unoffical Bats strict mode" described by:

- http://redsymbol.net/articles/unofficial-bash-strict-mode/

While the test fixture is straightforward, it took trial and error to
realize a few things. First, `set -u` changed in Bash 4.1-alpha. Chapter
and verse from https://tiswww.case.edu/php/chet/bash/CHANGES:

  This document details the changes between this version,
  bash-4.1-alpha, and the previous version, bash-4.0-release.

  n.  Fixed the behavior of `set -u' to conform to the latest Posix
      interpretation: every expansion of an unset variable except $@ and
      $* will cause the shell to exit.

This almost certainly accounts for the fact that referencing
`"${FOO[@]}"` when `FOO=()` is defined is OK under the latest Bash
4.4.12(1)-release, but breaks under the Bash 3.2.57(1)-release that
ships with macOS. The fix was to do an array length check before each
such operation.

It probably also accounts for the fact that under Bash 3.2.57, no error
output is generated at all for certain unset variable accesses. The
workaround there is to run the test using the latest version of Bash.

The biggest surprise was realizing that no error output is visible when
the unset variable access happens inside a DEBUG trap handler. All
versions of Bash seem susceptible to this.

As a result of these debugging subtleties, the test case contains a
thorough error message to suggest how to proceed when the fixture fails.
@mbland
Copy link
Contributor

mbland commented Oct 8, 2017

#26 addresses the set -o nounset issue.

@mbland
Copy link
Contributor

mbland commented Oct 16, 2017

#23 addresses the bats-preprocess breaks on tabs in @test lines issue.

So the last one is empty output lines missing from ${lines[@]}. @jasonkarns I'm happy to start tackling this one (later this week/weekend, most likely), but I'm wondering if we'd consider this a new "feature" at this point, to be postponed. Of the six issues listed in this thread, the other five clearly were bugs, but this last one is debatable.

@jasonkarns
Copy link
Member Author

I sorta agree. And depending on the solution would be most likely to introduce a breaking change... I'd like to see about tagging some releases with the bugs that have already been released and see if we're good to tag it 1.0!

@mbland
Copy link
Contributor

mbland commented Oct 20, 2017

@jasonkarns @btamayo How and when do y'all want to proceed? Should we ship what we've got? Do we want to get #9 in first? I'll have a little bandwidth this weekend to help keep 'er movin'.

@btamayo
Copy link
Member

btamayo commented Oct 27, 2017

@mbland @jasonkarns Sorry, work has kept me very busy, but bandwidth has opened up again. Phew.

I'm glad the project's buzzing! Just quickly scanned through this last issue and I think that backwards-compat for this release is top priority, and anything that will likely break that should be pushed. That way when people migrate from the fork point to this repo (0.4 to 1.0), it will be a seamless (theoretically) transition with no breaking behaviors.

If we lean towards this idea for 1.0, we can more easily zap bugs introduced between sstephenson/[email protected] and bats-core/[email protected] (including gathering reports and test cases). It makes the transition easier for users as well and makes the demarcation more clear.

Also it gives us a handy way to test out distributing the new package and announcing changes/deprecations for the next major version!

So yep, happy to ship what we got. :)

@mbland
Copy link
Contributor

mbland commented Jun 8, 2018

Per my comment in #16, we're set to release v1.0.0 soon without the empty lines in ${lines[@]}. Closing.

@mbland mbland closed this as completed Jun 8, 2018
@ghost ghost removed the in progress label Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants