Improve compiler sandbox safety.
All tables which are exposed to the compiler sandbox should use copies
instead of allowing the original tables to be visible.
In addition, we replace getmetatable with a safe variant which
refuses to expose the metatable of strings. All other metatable access
should be safe.
Check metatable of AST when doing line number correlation.
Document traceback and makeSearcher; update install instructions.
Turns out traceback was not mentioned at all; makeSearcher was only
Rearrange the install instructions to put LuaRocks inside the package
managers section and only recommend its use to people who already use
Honestly we shouldn't have to explain so much about luarocks except
its default setup is bad and won't work without path tweaks.
Make sandboxed require create a subscope.
Previously we were loading the whole file up in compiler scope, which
caused weird bugs like https://todo.sr.ht/~technomancy/fennel/24
Add file name to source maps
This allows for proper line numbering when expanding macros, for
example, whereas previously tracebacks would produce the line number
of the macro source but the file name of the invocation.
Rename core macros to avoid shadowing errors.
Makefile: add DESTDIR support
On Linux distributions, a standard practice is to override `DESTDIR`
when running `make install` during the packaging process.
Support using that variable rather than requiring `PREFIX` to be
Signed-off-by: Michel Alexandre Salim <email@example.com>
fennelview: remove sequential-length and associative-length options
Added check that integer keys are successfully incremented by 1
Preserve sequence metadata in quoting.
Ensure stablepairs never attempts to index nil.
I ran into an issue when integrating with lite. Lite implements a
"strict mode" by assigning a metatable to _G that throws an error
when an undefined global is accessed or set.
The implementation of stablepairs in 0.8.0 assumes that indexing
(. tbl nil) will harmlessly return nil. This is not true in the
presence of metatables. In lite's case, `current-global-names` ends
up calling it on _G; this causes _G[nil] to be accessed and an error
to be thrown.
fix number serialization
very small numbers like (* (math.cos 1.5707963267949) 15) horribly
broke previous representation by making it produce numbers like
I wonder if we can just always substitute , to . for now, until some
weird locale pop up that uses another character?
Improve cross-compilation; back to 5.3 for now.
Allow binary build paths to be overridden again.
Bump version to 0.9.0-dev.
This will probably be 1.0.0 but let's not jump to conclusions.
Perform cross-compilation for arm32; upgrade binaries to 5.4.2