-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCHANGELOG
335 lines (275 loc) · 9.59 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# Changelog
## 2023-09-20 - Version 0.3.9
Fixing several impactful bugs.
**Bug fixes**
- The ACI tests were incorrectly written in such a way that they would always pass. This has been addressed,
and safeguards put in place in the test driver to detect this in the future.
- Some statements nested in an every block would break the conditions if the item sequence was an array for
which multiple elements could be identified by the some that were valid (see the new `every_some` test for
a minimal reproduction). This has been fixed.
- Dead links were being incorrectly identified in some cases. This has been addressed by making the check
more precise and moving it to the functions pass.
- Var lookups into a virtual or base document would resolve the entire document, causing needless recursion.
This has been fixed.
## 2023-09-18 - Version 0.3.8
Adding new examples for Python and Rust usage.
**Python API**
- `regopy.build_info()` method added to return useful information about the `rego-cpp` build.
- `__repr__` implementations added to `Interpreter`, `Output`, and `Node` for easier repl usage
**Rust API**
- `Display` implementations added to `Node` and `Output`
## 2023-09-17 - Version 0.3.7
Adding the ability to build the library targeting the C++ 17 standard (as opposed to
c++ 20). Also a series of fixes to make the `cibuildwheel` pipeline work.
## 2023-09-14 - Version 0.3.6
Adding a Python wrapper.
**New Features**
- `wrappers/python/` contains a Python package, `regopy`, which wraps the library
and exposes a Python API.
**Bug Fixes**
- Fixed a bug where `to_json()` was incorrectly sorting arrays when the `sort`
flag was set to `true`.
- Removes a memory leak caused by a cyclic graph of Unifiers
- Fixes various use-after-free violations caused by missing `clone()` invocations.
## 2023-09-12 - Version 0.3.5
Adding C++ documentation.
**New Features**
- The C++ API is now documented using Doxygen. The documentation can be found
[here](https://microsoft.github.io/regocpp/).
- Logging levels have been added and can be set via the API (instead of just
binary enabled/disabled)
**Breaking changes**
- _C API_: The `regoSetLoggingEnabled` function has been replaced with
`regoSetLoggingLevel`. This is also reflected in the C++ and Rust APIs.h
- _C API_: The `regoSetExecutablePath` function has been removed due to the
`Interpreter::executable()` property being removed from the C++ API.
- The `to_json` method flag `rego_set` has been changed to `set_as_array` and
the order of its flag inverted (it is now `false` by default).
## 2023-09-10 - Version 0.3.4
Adding a Rust wrapper.
**New Features**
- `wrappers/rust/` contains a Rust crate, `regorust`, which wraps the library
and exposes a Rust API.
**Breaking changes**
- _C API_: The `regoAddInput*` functions are now named `regoSetInput*` and can
be used multiple times on the same interpreter.
- _C API_: `regoGet/SetStrictBuiltInErrors` has been added.
- The public headers have been reduced to just two files:
* `rego.hh` which contains the C++ API
* `rego_c.h` which contains the C API
- The `rego.hh` header is now a C++ header and will not compile in C.
- Many definitions have been moved to the (non-public) `internal.hh` header,
and code which relied on having access to those definitions will break.
## 2023-09-07 - Version 0.3.3
Adding a C API.
**New Features**
- `rego_c.h` contains a C API for the library
- `examples/c` contains an example that builds an interpreter using the C API
**Breaking Change**
The project was incorrectly configured to set the PUBLIC CMake build directory
to `include/rego` instead of `include`. This meant that projects consuming the
library using CMake FetchContent would include header files without a `rego/`
prefix, which would cause problems long term. This has been fixed, but as a result
any projects using the library via CMake FetchContent will need to update their
`#include` statements to include the `rego/` prefix.
## 2023-09-03 - Version 0.3.2
Adding tests based upon the Confidential ACI Rego framework.
**New Features**
- `aci.yaml` test suite
- Test cases can now specify modules using filenames
**Bug fixes**
- Long arithmetic expressions which are split over multiple lines are now
correctly parsed.
- A few fuzzer errors have been resolved
## 2023-09-03 - Version 0.3.1
Adding further builtins and test coverage, plus some minor
refactoring.
Adds the `bits`, `casts`, `types` builtins. Also adds the `regex`
builtins with the exception of `regex.globs_match`, which we will
add later along with the `globs` builtins.
**New Features**
- `bits` builtins
- `casts` builtins
- `types` builtins
- `regex` builtins (w/out `regex.globs_match`)
- Miscellaneous builtins
* `any`
* `all`
**New Test Coverage**
- `any`
- `all`
- `bitsand`
- `bitsnegate`
- `bitsor`
- `bitsshiftleft`
- `bitsshiftright`
- `bitsxor`
- `casts`
- `regexfind`
- `regexfindallstringsubmatch`
- `regexisvalid`
- `regexmatch`
- `regexreplace`
- `regexsplit`
- `regexmatchtemplate`
**Improvements**
- `unwrap_arg` and the associated `UnwrapOpt` struct provide a
straightforward way to unwrap arguments for built-ins while producing
the expected error messages for type mismatch.
- `unwrap` provides a set-based way to do optional unwrapping of terms.
## 2023-09-02 - Version 0.3.0
Minor release. From this point the implementation passes the Rego
test suite and can be considered a compatible Rego implementation.
Adds the `semver`, `objects`, and `units` builtins.
**New Features**
- `semver` builtins
- `objects` builtins
- `units` builtins
- Miscellaneous builtins
* `cast_array`
* `cast_set`
* `opa.runtime`
* `json.marshal`
* `time.now_ns`
**New Test Coverage**
- `assignments`
- `baseandvirtualdocs`
- `completedoc`
- `compositereferences`
- `comprehensions`
- `containskeyword`
- `dataderef`
- `defaultkeyword`
- `disjunction`
- `elsekeyword`
- `embeddedvirtualdoc`
- `eqexpr`
- `evaltermexpr`
- `every`
- `example`
- `fix1863`
- `functionerrors`
- `functions`
- `indirectreferences`
- `inputvalues`
- `negation`
- `nestedreferences`
- `object*`
- `partialdocconstants`
- `partialiter`
- `partialobjectdoc`
- `partialsetdoc`
- `refheads`
- `semver*`
- `subset`
- `toarray`
- `topdowndynamicdispatch`
- `toset`
- `type`
- `undos`
- `units`
- `varreferences`
- `virtualdocs`
- `withkeyword`
**Bug Fixes**
- A great many implementation details exposed by testing
## 2023-08-12 - Version 0.2.6
Adding the `aggregates`, `arrays`, and `strings` builtins.
**New Features**
- `aggregates` builtins
- `arrays` builtins
- `strings` builtins
- The library now supports arbitrary precision integers
**New Test Coverage**
- `aggregates`
- `array`
- `comparisonexpr`
- `compositebasedereference`
- `helloworld`
- `indexing`
- `intersection`
- `replacen`
- `sprintf`
- `strings`
- `trim`
- `trimleft`
- `trimprefix`
- `trimright`
- `trimspace`
- `trimsuffix`
- `union`
**Bug Fixes**
- Multiple implementation details exposed by testing
## 2023-08-12 - Version 0.2.5
Adding the `numbers` built-ins.
**New Features**
- `numbers` built-ins have been added
- The library now supports arbitrary precision integers
**Test Coverage**
- `arithmetic`
- `numbersrange`
- `rand`
- `sets`
**Bug Fixes**
- Multiple implementation details exposed by testing
## 2023-08-12 - Version 0.2.4
Adding a test driver that can execute OPA Rego-style YAML test files against the
`regocpp` interpreter.
**New Features**
- The `rego_test` driver is a tool that can process OPA Rego-style test case YAML files.
**Bug Fixes**
- Fixed an issue with assignment of arrays and objects to local variables.
**Improvements**
- All existing tests have been converted to use the test driver
## 2023-08-08 - Version 0.2.3
Adding the remainder of the missing language features, bringing the implementation fully
compliant with the published v0.55.0 grammar.
**New Features**
- Array, Set, and Object comprehensions
- `every` keyword
- `import` support
- `with` keyword
- Basic built-in framework in place. Added some builtins as well:
* `print`
* `startswith`
* `endswith`
* `count`
* `to_number`
* `union`
* `intersection`
- `bin-infix` support
- `ref` package names
**Bug fixes**
- Nested enumeration was not working properly. This has been fixed.
**Improvements**
- Turning on unification logging can be done on the command line (no recompile needed)
- Passes have been broken out for better comprehensibility
- Build time has been reduced
## 2023-07-11 - Version 0.2.2
Adding the `in`, `if`, `contains`, and `else` keywords.
**New Features**
- Added future keyword support to the runtime
- Added `in`, `if`, `contains`, and `else` keywords to the runtime
- Added partial set rule construction
- Added partial object rule construction
**Bug fixes**
- Else rule bodies were not previously handled correctly when the else keyword
was omitted. This has been fixed.
- `ExprCall` nodes can now (correctly) be a `RefHead`.
**Improvements**
- Function calls are now represented interally via a `ExprCall` node as opposed to
a `RefArgCall` node, to better reflect the target grammar.
## 2023-06-27 - Version 0.2.1
Addressing various minor improvements, bugs, and documentation issues.
**Bug fixes**
- Fixed a segfault when an input, data, or module file did not exist
- Fixed a segfault when a lookdown returns zero definitions
- Fixed various typos and errors in the documentation
- Fixed a potential infinite rewrite loop in the RuleBody pass
**Improvements**
- Rule values will no longer always be `UnifyBody` nodes but will be `Term` nodes
in cases when the rule returns a constant value.
- The code now uses the well-formed child indexing wherever possible for increased
robustness.
## 2023-06-21 - Version 0.2.0
Initial Release.