Changelog
View Source0.1.6
Added
foil:namespaces/0returns{ok, [namespace()]}— the list of registered namespaces. Saves callers from having to peek atfoil_modules:lookup/1internals to enumerate state.READMEgained a "Performance characteristics" section spelling out the compile-cost vs. lookup-cost trade-off (foil'sload/1is O(n);lookup/2beats ETS at ~0.1 μs vs 0.4 μs for*_direct_*patterns). Helps callers pick foil vs. ETS for new use cases.
Plan-time notes
- B4's "fix
foil_compiler:load/2spec to propagatecompile_failed" recommendation was checked on inspection and not acted on:compile:forms/2can only fail when the forms produced byfoil_compiler:forms/2are malformed, which is a foil internal bug rather than a runtime user-facing error. The current{ok, Module, Bin} = compile:forms(...)badmatch crashes loudly on that path, which is the right behaviour. Surfacing it as{error, compile_failed}would force every caller to write a branch they can't sensibly handle.
0.1.5
Added
foil_compiler:to_syntax/1now accepts maps, references, pids, ports, funs, and non-byte-aligned bitstrings. Maps compile to a propermap_exprliteral. The rest have no abstract literal form, so they ride through an integer syntax node — the BEAM module loader carries them in the compiled module's constant pool as-is, andfoil:lookup/2returns them unchanged.- eunit case
non_literal_terms_testround-trips each new type (including a nested tuple/map combination that mixes literal and non-literal values).
0.1.4
Changed
- CI moved from Travis (decommissioned years ago) to GitHub Actions. Matrix now covers OTP 25, 26, 27, 28.
- Documentation migrated from
edowntorebar3_ex_doc. Generateddoc/directory removed; HTML docs are now published to hexdocs. - Bumped
metaldependency from0.1.1to0.1.2. - Tightened the
error/0type from{error, atom()}to a sum:{error, foil_not_started | key_not_found | module_exists | module_not_found}. Dialyzer-checkable; same atoms the code already returns. No behavioural change. foil.erlrefactored to dispatch through a?WITH_MODULE(...)macro (defined infoil.hrl). Removes ~40 lines of repeated try/catch scaffolding fromall/1,delete/1,delete/2,insert/3,load/1, andlookup/2. Macro rather than function so the cache hot path stays branch-only; bench numbers unchanged.
Removed
.travis.yml,elvis.config,bin/elvis,rebar.config.script(rebar2 compatibility) — all unused.coverallsplugin and Makefile target — Travis-specific tooling.- Coveralls and Travis build badges from the README.