Skip to content

Commit

Permalink
Release 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Feb 16, 2025
1 parent 329c5ea commit 047a2fb
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 42 deletions.
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ fennel.lua: $(SRC) bootstrap/aot.lua $(PRECOMPILED)
@echo "-- SPDX-FileCopyrightText: Calvin Rose and contributors" >> $@
FENNEL_PATH=src/?.fnl $(LUA) bootstrap/aot.lua $< --require-as-include >> $@

build/macros.lua: src/fennel/macros.fnl; $(LUA) bootstrap/aot.lua $< --macro > $@
build/match.lua: src/fennel/match.fnl; $(LUA) bootstrap/aot.lua $< --macro > $@
bootstrap/macros.lua: src/fennel/macros.fnl; $(LUA) bootstrap/aot.lua $< --macro > $@
bootstrap/match.lua: src/fennel/match.fnl; $(LUA) bootstrap/aot.lua $< --macro > $@
bootstrap/view.lua: src/fennel/view.fnl
FENNEL_PATH=src/?.fnl $(LUA) bootstrap/aot.lua $< > $@

Expand Down Expand Up @@ -116,8 +116,6 @@ $(NATIVE_LUA_LIB): $(LUA_INCLUDE_DIR) ; $(MAKE) -C $(BIN_LUA_DIR)/src liblua.a
$(NATIVE_LUAJIT_LIB): $(LUAJIT_INCLUDE_DIR)
$(MAKE) -C $(BIN_LUAJIT_DIR) BUILDMODE=static

# TODO: update setup.md to point to new filenames on next release
# to cross-compile, run: make fennel.exe CC=x86_64-w64-mingw32-gcc
fennel.exe: src/launcher.fnl fennel $(LUA_INCLUDE_DIR)/liblua-mingw.a
$(COMPILE_ARGS) ./fennel --no-compiler-sandbox \
--compile-binary $< fennel-bin \
Expand Down Expand Up @@ -180,15 +178,15 @@ upload: fennel fennel.lua fennel-bin
mv fennel downloads/fennel-$(VERSION)
mv fennel.lua downloads/fennel-$(VERSION).lua
mv fennel-bin downloads/fennel-$(VERSION)-x86_64
mv fennel.exe downloads/fennel-$(VERSION)-windows.exe
mv fennel.exe downloads/fennel-$(VERSION).exe
gpg -ab downloads/fennel-$(VERSION)
gpg -ab downloads/fennel-$(VERSION).lua
gpg -ab downloads/fennel-$(VERSION)-x86_64
gpg -ab downloads/fennel-$(VERSION)-windows.exe
gpg -ab downloads/fennel-$(VERSION).exe
ssh-keygen -Y sign -f $(SSH_KEY) -n file downloads/fennel-$(VERSION)
ssh-keygen -Y sign -f $(SSH_KEY) -n file downloads/fennel-$(VERSION).lua
ssh-keygen -Y sign -f $(SSH_KEY) -n file downloads/fennel-$(VERSION)-x86_64
ssh-keygen -Y sign -f $(SSH_KEY) -n file downloads/fennel-$(VERSION)-windows.exe
ssh-keygen -Y sign -f $(SSH_KEY) -n file downloads/fennel-$(VERSION).exe
rsync -rtAv downloads/fennel-$(VERSION)* \
[email protected]:fennel-lang.org/downloads/

Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Note that since 0.3.0, no deprecations have actually resulted in
removals. They are advisory only and we have no plans to break the
deprecated forms.

## 1.5.2 / ???
## 1.5.2 / 2025-02-16

### New Features

Expand Down
64 changes: 43 additions & 21 deletions man/man3/fennel-api.3
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
. ftr VB CB
. ftr VBI CBI
.\}
.TH "fennel-api" "3" "2024-08-24" "fennel 1.5.1" "Fennel\[aq]s Lua API"
.TH "fennel-api" "3" "2025-02-10" "fennel 1.5.2" "Fennel\[aq]s Lua API"
.hy
.SH NAME
.PP
Expand Down Expand Up @@ -82,6 +82,10 @@ compile errors in
\f[V]keywords\f[R]: a table of the form
\f[V]{:keyword1 true :keyword2 true}\f[R] containing symbols that should
be treated as reserved Lua keywords.
.IP \[bu] 2
\f[V]global-mangle\f[R]: whether to mangle globals in compiler output;
set to \f[V]false\f[R] to turn global references that aren\[aq]t valid
Lua into \f[V]_G[\[aq]hello-world\[aq]]\f[R].
.PP
You can pass the string \f[V]\[dq]_COMPILER\[dq]\f[R] as the value for
\f[V]env\f[R]; it will cause the code to be run/compiled in a context
Expand All @@ -105,27 +109,42 @@ fennel.repl([options])
.PP
Takes these additional options:
.IP \[bu] 2
\f[V]readChunk()\f[R]: a function that when called, returns a string of
source code.
Should return nil when there is no more source, which will exit the
\f[V]readChunk(state)\f[R]: a function that when called, returns a line
of code to run.
This can be an incomplete expression, in which case it will be called
again until a complete expression can be constructed.
The state argument is a table with a \f[V]stack-size\f[R] field which
will be zero unless it\[aq]s reading a continuation of previous input.
Strings returned should end in newlines.
It should return nil when there is no more source, which will exit the
repl.
.IP \[bu] 2
\f[V]pp\f[R]: a pretty-printer function to apply on values (default:
\f[V]fennel.view\f[R]).
.IP \[bu] 2
\f[V]view-opts\f[R]: an options table passed to \f[V]pp\f[R] (default:
\f[V]{:depth 4}\f[R]).
.IP \[bu] 2
\f[V]onValues(values)\f[R]: a function that will be called on all
returned top level values.
Takes a table of values.
\f[V]onValues(values)\f[R]: a function which is called for every
evaluation with a sequence table containing string representations of
each of the values resulting from the input.
.IP \[bu] 2
\f[V]onError(errType, err, luaSource)\f[R]: a function that will be
called on each error.
\f[V]errType\f[R] is a string with the type of error, can be either,
\[aq]parse\[aq], \[aq]compile\[aq], \[aq]runtime\[aq], or \[aq]lua\[aq].
\f[V]errType\f[R] is a string with the type of error: \[aq]parse\[aq],
\[aq]compile\[aq], \[aq]runtime\[aq], or \[aq]lua\[aq].
\f[V]err\f[R] is the error message, and \f[V]luaSource\f[R] is the
source of the generated lua code.
.IP \[bu] 2
\f[V]pp(x)\f[R]: a pretty-printer function to apply on values (default:
\f[V]fennel.view\f[R]).
.IP \[bu] 2
\f[V]view-opts\f[R]: an options table passed to \f[V]pp\f[R] (default:
\f[V]{:depth 4}\f[R]).
.IP \[bu] 2
\f[V]rawValues(...)\f[R]: a function which is passed the raw values from
evaluation; like \f[V]onValues\f[R] but receives the underlying data
rather than the string representation.
.PP
Note that overriding \f[V]readChunk\f[R]/\f[V]onValues\f[R] will only
affect input and output initiated by the repl directly.
If the repl runs code that calls \f[V]print\f[R], \f[V]io.write\f[R],
\f[V]io.read\f[R], etc, those will still use stdio unless overridden in
\f[V]env\f[R].
.PP
By default, metadata will be enabled and you can view function
signatures and docstrings with the \f[V],doc\f[R] command in the REPL.
Expand All @@ -141,8 +160,9 @@ You can pass \f[V]fennel.repl.repl\f[R] instead.
Any fields set on \f[V]fennel.repl\f[R], which is actually a table with
a \f[V]__call\f[R] metamethod rather than a function, will used as a
fallback for any options passed to \f[V](fennel.repl)\f[R] before
defaults are applied, allowing one to customize the default behavior of
\f[V](fennel.repl)\f[R]:
defaults are applied, allowing one to
.PP
customize the default behavior of \f[V](fennel.repl)\f[R]:
.IP
.nf
\f[CR]
Expand Down Expand Up @@ -308,10 +328,12 @@ local lua = fennel.compileString(fennelcode[, options])
.PP
Also aliased to \f[V]fennel.compile-string\f[R] for convenience calling
from Fennel.
.SH CONVERT TEXT INTO AST NODE(S)
.SH PARSE TEXT INTO AST NODES
.PP
The \f[V]fennel.parser\f[R] function returns a stateful iterator
function.
The \f[V]fennel.parser\f[R] function returns a function which you can
call repeatedly to get successive AST nodes from a string.
This happens to be an iterator function, so you can use it with
Lua\[aq]s \f[V]for\f[R] or Fennel\[aq]s \f[V]each\f[R].
If a form was successfully read, it returns true followed by the AST
node.
Returns nil when it reaches the end.
Expand Down Expand Up @@ -523,7 +545,7 @@ when possible
\f[V]utf8?\f[R] (default: true) whether to use utf8 module to compute
string lengths
.IP \[bu] 2
\f[V]max-sparse-gap\f[R] (number, default: 10) maximum gap to fill in
\f[V]max-sparse-gap\f[R] (number, default: 1) maximum gap to fill in
with nils in sparse sequential tables before switching to curly
brackets.
.IP \[bu] 2
Expand Down
2 changes: 1 addition & 1 deletion man/man5/fennel-reference.5
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
. ftr VB CB
. ftr VBI CBI
.\}
.TH "fennel-reference" "5" "2024-08-24" "fennel 1.5.1" "Fennel Reference"
.TH "fennel-reference" "5" "2025-02-10" "fennel 1.5.2" "Fennel Reference"
.hy
.SH NAME
.PP
Expand Down
2 changes: 1 addition & 1 deletion man/man7/fennel-tutorial.7
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
. ftr VB CB
. ftr VBI CBI
.\}
.TH "fennel-tutorial" "7" "2024-08-24" "fennel 1.5.1" "Getting Started with Fennel"
.TH "fennel-tutorial" "7" "2025-02-10" "fennel 1.5.2" "Getting Started with Fennel"
.hy
.SH NAME
.PP
Expand Down
20 changes: 10 additions & 10 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ installed on your system.
This method requires you to manually update the `fennel` script when
you want to use a newer version that has come out.

1. Download [the fennel script](https://fennel-lang.org/downloads/fennel-1.5.1)
2. Run `chmod +x fennel-1.5.1` to make it executable
1. Download [the fennel script](https://fennel-lang.org/downloads/fennel-1.5.2)
2. Run `chmod +x fennel-1.5.2` to make it executable
3. Download [and verify](https://fennel-lang.org/security#signatures)
the [signature](https://fennel-lang.org/downloads/fennel-1.5.1.asc)
the [signature](https://fennel-lang.org/downloads/fennel-1.5.2.asc)
(optional).
4. Move `fennel-1.5.1` to a directory on your `$PATH`, such as `/usr/local/bin`
4. Move `fennel-1.5.2` to a directory on your `$PATH`, such as `/usr/local/bin`

**Note**: You can rename the script to `fennel` for convenience. Or
you can leave the version in the name, which makes it easy to keep
Expand All @@ -57,11 +57,11 @@ This method requires you to manually update the `fennel` binary when
you want to use a newer version that has come out.

1. Choose one the options below, depending on your system:
- [GNU/Linux x86_64](https://fennel-lang.org/downloads/fennel-1.5.1-x86_64)
([signature](https://fennel-lang.org/downloads/fennel-1.5.1-x86_64.asc))
- [Windows x86 32-bit](https://fennel-lang.org/downloads/fennel-1.5.1-windows32.exe)
([signature](https://fennel-lang.org/downloads/fennel-1.5.1-windows32.exe.asc))
2. Run `chmod +x fennel-1.5.1*` to make it executable
- [GNU/Linux x86_64](https://fennel-lang.org/downloads/fennel-1.5.2-x86_64)
([signature](https://fennel-lang.org/downloads/fennel-1.5.2-x86_64.asc))
- [Windows](https://fennel-lang.org/downloads/fennel-1.5.2.exe)
([signature](https://fennel-lang.org/downloads/fennel-1.5.2.exe.asc))
2. Run `chmod +x fennel-1.5.2*` to make it executable
3. Download [and verify](https://fennel-lang.org/security#signatures) the signature
(optional).
4. Move the downloaded binary to a directory on your `$PATH`, such as `/usr/local/bin`
Expand Down Expand Up @@ -93,7 +93,7 @@ them all here; please [see the wiki page on distribution for details](https://wi

The Fennel compiler can be added to your application and then loaded from Lua.

1. Add [fennel.lua](https://fennel-lang.org/downloads/fennel-1.5.1.lua) to your code repository.
1. Add [fennel.lua](https://fennel-lang.org/downloads/fennel-1.5.2.lua) to your code repository.
2. Add the following line to your Lua code:

```lua
Expand Down
2 changes: 1 addition & 1 deletion src/fennel/utils.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

(local view (require :fennel.view))

(local version :1.5.2-dev)
(local version :1.5.2)

;;; Cross-Lua compat helpers

Expand Down

0 comments on commit 047a2fb

Please sign in to comment.