[ANN] Fennel 1.0.0 released

Message ID
DKIM signature
Download raw message
This is it, pals; the one we've been waiting for.

I'm proud to annouce the release of Fennel 1.0.0!

The big thing to note here is that this is intended to be the last
release with intentionally breaking changes. From here on out it is our
hope that all further changes are done in a backwards-compatible way. Of
course, every change and every bug fix has the potential to break
*something* as it's possible to write code which depends on the presence
of bugs, so there will always be a bit of a judgement call with this
sort of thing. But that is our goal.

# 1.0.0 / 2021-11-14

## New Features
* Allow `collect` to take two body arguments instead of requiring `values`
* Support `--rename-native-module` when compiling binaries
* Add `:into` clause to `collect` and `icollect`
* Add Macro guide
* Improve consistency of table key ordering in compiled output
* Apply strict globals checking in the repl by default
* Allow strict globals checking to be disabled with `--globals "*"`
* Emit warning when `--require-as-include` fails to find a module to include
* Support `--add-macro-path` for configuring macro path similarly to fennel module paths
* Support `__fennelrest` metamethod for changing `&` destructuring behavior

## Bug Fixes
* Apply nil checks to `&` destructuring inside `match`
* Fix a bug where relative require didn't work with `import-macros`
* The `fennel.view` function no longer outputs invalid UTF-8 when given invalid input
* Fix a bug where macro modules did not get compiler options propagated
* Fix a bug where `-?>` and `-?>>` checked for false values, not just nil
* Fix a bug where `let` locals escaped their scope at the top level of the repl

## Changes and Removals
* **Remove** `fennelview.lua` from the repo as it is part of the main API now
* **Remove `doc`** special form; replace with `,doc` repl command
* Compiler plugins will warn when run on a version they do not support
* Backslash followed by a literal newline in a string is now parsed as newline
* Improve performance of `icollect` by avoiding unnecessary length checks
* **Enforce compiler sandbox** by default instead of warning
* **Disallow &** in identifiers
* Implicit else branches in `if` are treated as nil, **not zero values**

Since this was the last chance to get in breaking changes, there are
more of them in this release than any other prior release. I want to
call out a few of them especially that might be more likely to cause issues:

First is the fact that fennelview.lua is no longer provided as a
separate file. This may break some codebases, but that file is no longer
necessary as the function fennel.view does the same thing. Of course you
can just keep around the old fennelview.lua file from old versions if
you don't want to update to the new fennel.view function right away.

While we have emitted warnings for this for quite some time, the
enabling of the compiler sandbox is also likely to break a few
things. When the compiler sandbox is enabled, it **should** be safe to
compile arbitrary untrusted code without concerning about attackers
getting access to your system. Note that this has not gone thru a
security audit, and it's still not recommended to compile untrusted code
on a machine that contains data which is sensitive without further
protective measures. But the compiler sandbox should go a long way
towards making Fennel safer by default.

Finally I want to point out the change to `if`: previously the implied
"else" block would return zero values while now it returns nil. The
difference between zero values and nil is rather subtle, and breakage
caused by this can be difficult to trace to the root cause. If you need
to return to the old behavior, you can add an empty (values) as the
final argument in your if calls.

Pull it in thru git or grab a manual download thru the setup guide links:


Huge thanks to everyone who has contributed to get us to this point, and
to everyone who's used the language and offered feedback, thoughts, and
suggestions. We could never have made it here without such a strong

Reply to thread Export thread (mbox)