Commit Graph

8 Commits

Author SHA1 Message Date
Johan Fylling 7bb6dbe36b Preparing for v1 API
Moving (most) source to v1 root package to prepare for v0/v1 API separation.

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-12-12 15:09:03 +01:00
Johan Fylling 5521453d87 cmd: Adding --v0-compatible flag (#7065)
To make OPA behave as v0.x post v1.0 release.
If used simultaneously with `--v1-compatible` flag, the `--v0-compatible` flag takes precedence.

Also, future-proofing `cmd` package tests for 1.0.

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-09-26 00:45:51 +02:00
Johan Fylling b36151d992 Adding --v1-compatible flag to all previously unsupported command line commands (#6521)
In addition to those commands already supported:

* build
* check
* eval
* fmt
* test

support has been added to the following commands:

* `bench`
* `deps`
* `exec`
* `inspect`
* `parse`
* `run` (command `server` and `REPL`)

Fixes: #6520

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-01-24 15:42:32 +01:00
Charlie Egan cd0bf5b4d2 Add option to marshal location text (#6234) 2023-09-21 09:40:07 +01:00
Ronnie-personal 38733ed746 ast: Add location to single entry rule head ref (#6212)
Fixes: #6199
Signed-off-by: Ronnie Personal <76408835+Ronnie-personal@users.noreply.github.com>
2023-09-18 11:45:51 +02:00
Gianluca Oldani 1e38591597 parse: include rule head location when requested
Prior to this commit, when the AST information
were serialized to JSON, rules expressed as

discussed in #5790 included only the location
of their value and not the one of the rule
ref var itself. Now the AST serialized to
JSON includes this information.

Fixes: #5790
Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>
2023-04-18 16:55:55 -07:00
Charlie Egan fbfa705063 [ast/opa parse] Support marshalling of all ast location data (#5576)
Signed-off-by: Charlie Egan <charlie@styra.com>
2023-03-09 09:49:30 +00:00
Patrick East 4f323e0597 cmd: Add very basic parse cmd coverage
There was an issue a little while back where we had a panic in the
command but there is zero test coverage exercising it... so we never
noticed.

This at least will get us some bare-bones test coverage to ensure
it isn't crashing on some basic use-cases.

Signed-off-by: Patrick East <east.patrick@gmail.com>
2020-03-23 06:06:39 -07:00