All packages, except for `cmd` and `internal`, have been moved into a new `v1` root package.
Old packages are kept for backwards-compatibility reasons. All contained code is replaced with simple type aliases and proxy functions to `v1` implementations.
Old packages default to the Rego v0 syntax, new `v1` packages default to the Rego v1 syntax.
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
This isn't needed anymore, so now we don't.
Also enabled the copyloopvar linter in case we
accidentally do this in the future.
Signed-off-by: Anders Eknert <anders@styra.com>
* Debugger: allow YAML to be used as input
By using the unmarshal function from util instead of the stdlib
Signed-off-by: Anders Eknert <anders@styra.com>
* Adding test
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
---------
Signed-off-by: Anders Eknert <anders@styra.com>
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
Co-authored-by: Johan Fylling <johan.dev@fylling.se>
The step-over action would previously skip over any associated partial "sibling" rules if performed on the last statement of a partial rule.
Now, step-over will break on any `enter` operation immediately preceded by an `exit` or `fail` operation; effectively breaking on every visited partial rule sharing a node in the rule-tree.
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
even when there are no explicit `input` and `data` documents.
This makes discoverability of the scopes much better, as users will know to expect them.
Whereas, if it's only enabled/visible when there is an actual document, a user who
has not come across it before might not realize it should appear, and can therefore
be slow to realize scenarios where their setup is expecting an `input` document, but
is missing it for some reason.
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
This three projects (VSCode OPA, nvim-dap-rego, and Regal) building on
this API, I've attempted to update the docs in the right places to
showcase these and their utility to rego authors.
Signed-off-by: Charlie Egan <charlie@styra.com>