Skip to content

Commit c66b690

Browse files
committed
Bump version to 0.9.7 — bug fixes for float precision, optional modules, and build system
1 parent f75af89 commit c66b690

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All notable changes to Gravity are documented in this file.
44

5+
## [0.9.7] - 2026-04-14
6+
7+
### Fixed
8+
- **Float precision loss in JSON bytecode serialization** — float constants were written with `%f` (6 decimal places), silently rounding small values like `-0.000000004` to zero and causing `RUNTIME ERROR: Unknown LOADK index` on the `-c`/`-x` (compile + execute bytecode) path. Switched to `%.17g` for full IEEE 754 double round-trip precision (issue #420).
9+
- **Float constant deduplication in cpool**`gravity_function_cpool_add` used the epsilon-based `gravity_value_equals` (EPSILON = 1e-6) to detect duplicate constants, incorrectly merging distinct small floats into a single pool entry. The cpool now uses exact bit-level comparison for float values (issue #420).
10+
- **`gravity_optionals.h` unconditionally defined all optional-module guards** — the `#ifndef GRAVITY_INCLUDE_*` blocks always defined every guard, making it impossible to exclude modules at compile time. The guards are now left undefined by default; embedders define only the modules they need. The Gravity CLI and runtime define all four (issue #426).
11+
- **Makefile dependency errors** — four issues: `gravity` and `example` were incorrectly listed as `.PHONY` targets (causing unconditional rebuilds); `lib` depended on the `gravity` executable instead of just `$(OBJ)`; `gravity.c` and `example.c` were compiled only during the link step so `-MMD` never generated `.d` header-dependency files for them; `make clean` did not remove `libgravity.dylib` on macOS (issue #413).
12+
- **`run_all.sh` portability** — the test runner used GNU `timeout` which is not available on macOS. The script now auto-detects `timeout`, `gtimeout` (Homebrew coreutils), or falls back to a pure-bash kill-watcher.
13+
14+
### Changed
15+
- Version bumped to **0.9.7** (`GRAVITY_VERSION`, `GRAVITY_VERSION_NUMBER`).
16+
17+
---
18+
519
## [0.9.6] - 2026-04-14
620

721
### Fixed

src/shared/gravity_value.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
extern "C" {
6767
#endif
6868

69-
#define GRAVITY_VERSION "0.9.6" // git tag 0.9.6
70-
#define GRAVITY_VERSION_NUMBER 0x000906 // git push --tags
69+
#define GRAVITY_VERSION "0.9.7" // git tag 0.9.7
70+
#define GRAVITY_VERSION_NUMBER 0x000907 // git push --tags
7171
#define GRAVITY_BUILD_DATE __DATE__
7272

7373
#ifndef GRAVITY_ENABLE_DOUBLE

0 commit comments

Comments
 (0)