You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's that time of the year again. The plan is to use Fish 3.0, make Fishtape faster, smaller, revise the API, and whatnot.
The biggest breaking change will be going back to running tests serially. This makes your tests behave more predictably and might even make most tests out there faster since we'd no longer block (per file), need that extra subshell, or have to handle background jobs.
Serial processing also means we don't have to preprocess test files anymore, so setup and teardown are no longer necessary. The best way to do work before and after a test is simply right there in your test file.
I also think it's a good time to remove all the magic left in Fishtape, e.g.: automatically collapsing newlines in test arguments.
Magic makes it more difficult to reason about your code because it violates the principle of WYSIWYG. If you want to turn (seq 3) into "1 2 3" you really need use to echo or pipe it into string join " ", which is a bit more code than before, but at least it's correct, so when things break it will be more likely your code and not Fishtape.
The text was updated successfully, but these errors were encountered:
It's that time of the year again. The plan is to use Fish 3.0, make Fishtape faster, smaller, revise the API, and whatnot.
The biggest breaking change will be going back to running tests serially. This makes your tests behave more predictably and might even make most tests out there faster since we'd no longer block (per file), need that extra subshell, or have to handle background jobs.
Serial processing also means we don't have to preprocess test files anymore, so
setup
andteardown
are no longer necessary. The best way to do work before and after a test is simply right there in your test file.I also think it's a good time to remove all the magic left in Fishtape, e.g.: automatically collapsing newlines in test arguments.
Consider this (surprisingly) passing test:
This is magic. The right way to write this is:
Magic makes it more difficult to reason about your code because it violates the principle of WYSIWYG. If you want to turn (seq 3) into "1 2 3" you really need use to echo or pipe it into string join " ", which is a bit more code than before, but at least it's correct, so when things break it will be more likely your code and not Fishtape.
The text was updated successfully, but these errors were encountered: