|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 2025-10-31 - Version 1.1.0 |
| 4 | +Minor version adding more json builtins and an improved built-in system. |
| 5 | + |
| 6 | +This change adds some json builtins and also completely refactors the built-in |
| 7 | +system to make it more efficient. It also adds some quality of life improvements |
| 8 | +to the C++ API. The C API remains stable, but the C++ API exposes additional |
| 9 | +methods to make handling outputs of queries a bit easier. |
| 10 | + |
| 11 | +**New Features** |
| 12 | +- `json.filter`, `json.patch`, and `json.remove` are now available |
| 13 | +- All built-ins are now accounted for in the built-in system, and those which |
| 14 | + are not supported are explicitly marked as such. |
| 15 | +- There is now an `Output` class, which is returned from the new `query_output` |
| 16 | + method on `Interpreter`. It provides methods which are similar to those available |
| 17 | + in the C API for inspecting the output of a query. |
| 18 | +- There are now `try_get_double`, `try_get_string`, and `try_get_bool` methods |
| 19 | + which will attempt to get raw C++ types from Node objects. |
| 20 | +- The `whitelist` and `blacklist` methods in `BuiltInsDef` provide fine-grained |
| 21 | + control over which built-ins are allowed to be loaded. |
| 22 | +- The `stmt_limit` method on `Interpreter` provides a time-out mechanism (defined |
| 23 | + as number of statements which the VM is allowed to execute) |
| 24 | + |
| 25 | +**Improvements** |
| 26 | +- The `Interpreter` object can now be created at almost no cost. A large portion |
| 27 | + of its construction cost was the creation of the `BuiltIns` lookup structure, |
| 28 | + which now is defined statically in-code. |
| 29 | +- The test driver can now run all the tests in the OPA test suite and will skip |
| 30 | + those which use a built-in that is not available in the current implementation. |
| 31 | + This means we do not have to cherry-pick tests anymore, and will pick up |
| 32 | + new tests more cleanly. |
| 33 | +- New methods for creating scalar nodes have been added (`number`, `boolean`, |
| 34 | + `string`, `null`) and the existing `scalar` methods have been deprecated. |
| 35 | + |
| 36 | +**Breaking Changes** |
| 37 | +- The `get_string` method, which previously returned the raw string of the Trieste |
| 38 | + node, now tries to get a string from a `JSONString` node and strips it of its |
| 39 | + quotes (in line with the other `get_*` methods). The previous functionality is |
| 40 | + available via `get_raw_string`. |
| 41 | + |
| 42 | +**Bug Fixes** |
| 43 | +- Fuzzer bug with `SomeDecl` in a `NotExpr` |
| 44 | +- An issue with built-ins not being written to binary bundles |
| 45 | +- A unification bug with variables in comprehensions that had the same name as their module |
| 46 | +- `regopy` now performs some additional checks to ensure it is loading the correct |
| 47 | + shared library on all platforms |
| 48 | +- Ubuntu 22.04 builds are now working again and the image has been added back to the workflow |
| 49 | +- macos/x86_64 image has been added back to the workflow, and shared library builds |
| 50 | + (for the Python and dotnet wrappers) |
| 51 | +- Unification bug with masking scopes and variables with comprehensions and every |
| 52 | + |
3 | 53 | ## 2025-10-12 - Version 1.0.0 |
4 | 54 | Major version adding VM-based execution of bundles. |
5 | 55 |
|
|
0 commit comments